summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-01-10 09:46:27 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2012-01-10 09:46:27 +0100
commit80596b174c63e58e973b70da69bbd2b6303c19d3 (patch)
tree523bd6b4270aa916d6a754360897d7befbef572e
parent438d0cc544cc7c51bdace97cdc64bb009963080c (diff)
Fixed compilation error.
-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));