From 0d615a18d51526c819db939c55495ca2a424ce38 Mon Sep 17 00:00:00 2001 From: Senthil Date: Wed, 9 Mar 2016 01:11:10 -0800 Subject: [PATCH] Fix obtaining raw string_t pointer from temporary --- Release/src/json/json_parsing.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Release/src/json/json_parsing.cpp b/Release/src/json/json_parsing.cpp index ea7ee52e89..13e3d59006 100644 --- a/Release/src/json/json_parsing.cpp +++ b/Release/src/json/json_parsing.cpp @@ -63,7 +63,8 @@ void CreateException(const Token &tk, const utility::string_t &message) { utility::ostringstream_t os; os << _XPLATSTR("* Line ") << tk.start.m_line << _XPLATSTR(", Column ") << tk.start.m_column << _XPLATSTR(" Syntax error: ") << message; - throw web::json::json_exception(os.str().c_str()); + utility::string_t osStr = os.str(); + throw web::json::json_exception(osStr.c_str()); } template