--- celestia-1.4.1/src/celestia/celx.cpp-after-patch1 2006-07-31 09:06:13.000000000 +1000
+++ celestia-1.4.1/src/celestia/celx.cpp 2006-07-31 09:05:08.000000000 +1000
@@ -530,6 +530,8 @@
status = lua_resume(co, narg);
if (status == 0)
+ return 0;
+ else if (status == LUA_YIELD)
{
int nres = lua_gettop(co);
#if 0
@@ -541,7 +543,7 @@
}
else
{
- lua_xmove(co, L, 1); // move error message
+ lua_xmove(co, L, -1); // move error message
return -1; // error flag
}
}
@@ -711,7 +713,8 @@
// no other errors, and execution terminates normally. There
// should be a better way to figure out whether the script ended
// normally . . .
- if (strcmp(errorMessage, "cannot resume dead coroutine") != 0)
+ if (errorMessage
+ && strcmp(errorMessage, "cannot resume dead coroutine") != 0)
{
cout << "Error: " << errorMessage << '\n';
CelestiaCore* appCore = getAppCore(co);