summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/luaresume.cc10
1 files 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));