From 80596b174c63e58e973b70da69bbd2b6303c19d3 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 10 Jan 2012 09:46:27 +0100 Subject: Fixed compilation error. --- server/src/luaresume.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/src/luaresume.cc b/server/src/luaresume.cc index d3597ad..49de8be 100644 --- a/server/src/luaresume.cc +++ b/server/src/luaresume.cc @@ -96,7 +96,7 @@ std::string LUAResume::run(std::string program) { if(L == NULL) { ERR(luaresume, "LUA state not initialized!"); - return false; + return ""; } DEBUG(luaresume, "Running %s\n", program.c_str()); @@ -114,23 +114,23 @@ std::string LUAResume::run(std::string program) if(luaL_loadbuffer(L, program.c_str(), program.size(), "lua resume generator")) { ERR(luaresume, "loadbufer: %s\n", lua_tostring(L, lua_gettop(L))); - return false; + return ""; } // Run the loaded code if(lua_pcall(L, 0, LUA_MULTRET, 0)) { ERR(luaresume, "pcall: %s\n" , lua_tostring(L, lua_gettop(L))); - return false; + return ""; } if(top != lua_gettop(L) - 1) { ERR(luaresume, "Program did not return a single value.\n"); - return false; + return ""; } if(lua_isstring(L, lua_gettop(L)) == false) { ERR(luaresume, "Program did not return a string value.\n"); - return false; + return ""; } std::string res = lua_tostring(L, lua_gettop(L)); -- cgit v1.2.3