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