Skip to content
Permalink
Browse files

Fix possible implicit conversion of NULL to std::string

  • Loading branch information
kwolekr committed Nov 21, 2013
1 parent 98e4e2b commit 5323d800cc67814938fb668730d474011631fab5
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/script/common/c_internal.cpp
@@ -57,7 +57,9 @@ int script_error_handler(lua_State *L) {

void script_error(lua_State *L)
{
throw LuaError(NULL, lua_tostring(L, -1));
const char *s = lua_tostring(L, -1);
std::string str(s ? s : "");
throw LuaError(NULL, str);
}

// Push the list of callbacks (a lua table).

0 comments on commit 5323d80

Please sign in to comment.
You can’t perform that action at this time.