From 9d108d2bde81582a2a6ea73ad0199b25202c0765 Mon Sep 17 00:00:00 2001 From: rude Date: Sun, 9 Jan 2011 16:36:13 +0100 Subject: [PATCH] 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. --- src/modules/thread/sdl/Thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/thread/sdl/Thread.cpp b/src/modules/thread/sdl/Thread.cpp index 4a36752ab..e8228e312 100644 --- a/src/modules/thread/sdl/Thread.cpp +++ b/src/modules/thread/sdl/Thread.cpp @@ -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);