Skip to content

Commit 0d615a1

Browse files
author
Senthil
committed
Fix obtaining raw string_t pointer from temporary
1 parent 3070ca2 commit 0d615a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Release/src/json/json_parsing.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ void CreateException(const Token &tk, const utility::string_t &message)
6363
{
6464
utility::ostringstream_t os;
6565
os << _XPLATSTR("* Line ") << tk.start.m_line << _XPLATSTR(", Column ") << tk.start.m_column << _XPLATSTR(" Syntax error: ") << message;
66-
throw web::json::json_exception(os.str().c_str());
66+
utility::string_t osStr = os.str();
67+
throw web::json::json_exception(osStr.c_str());
6768
}
6869

6970
template <typename Token>

0 commit comments

Comments
 (0)