Added missing lua_strlen to ThreadVariant construction. MSVC coerced the 'const char*'-argument into the bool version of the constructor, causing the wrong function to be called.

This commit is contained in:
rude
2011-01-09 16:36:13 +01:00
parent 31c9995082
commit 9d108d2bde
+1 -1
View File
@@ -54,7 +54,7 @@ namespace sdl
if(luaL_dostring(L, comm->getCode()) == 1)
{
SDL_mutexP((SDL_mutex*) comm->mutex);
ThreadVariant *v = new ThreadVariant(lua_tostring(L, -1));
ThreadVariant *v = new ThreadVariant(lua_tostring(L, -1), lua_strlen(L, -1));
comm->setValue("error", v);
v->release();
SDL_mutexV((SDL_mutex*) comm->mutex);