Commits

Laurens Rodriguez committed f968423

kcorolib.c: fixes from Lua 5.2.2

Comments (0)

Files changed (1)

src/libraries/killa/kcorolib.c

       killa_insert(L, -2);
       killa_concat(L, 2);
     }
-    killa_error(L);  /* propagate error */
+    return killa_error(L);  /* propagate error */
   }
   return r;
 }
 
 
 static int killaB_cocreate (killa_State *L) {
-  killa_State *NL = killa_newthread(L);
+  killa_State *NL;
   killaL_checktype(L, 1, KILLA_TFUNCTION);
+  NL = killa_newthread(L);
   killa_pushvalue(L, 1);  /* move function to top */
   killa_xmove(L, NL, 1);  /* move function from L to NL */
   return 1;