aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lbaselib.c b/lbaselib.c
index c68e6d38..747fd45a 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -106,7 +106,7 @@ static int luaB_tonumber (lua_State *L) {
106 return 1; 106 return 1;
107 } /* else not a number */ 107 } /* else not a number */
108 } /* else not a number */ 108 } /* else not a number */
109 lua_pushnil(L); /* not a number */ 109 luaL_pushfail(L); /* not a number */
110 return 1; 110 return 1;
111} 111}
112 112
@@ -308,9 +308,9 @@ static int load_aux (lua_State *L, int status, int envidx) {
308 return 1; 308 return 1;
309 } 309 }
310 else { /* error (message is on top of the stack) */ 310 else { /* error (message is on top of the stack) */
311 lua_pushnil(L); 311 luaL_pushfail(L);
312 lua_insert(L, -2); /* put before error message */ 312 lua_insert(L, -2); /* put before error message */
313 return 2; /* return nil plus error message */ 313 return 2; /* return fail plus error message */
314 } 314 }
315} 315}
316 316