diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.190 2013/09/13 16:21:52 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.191 2013/12/04 12:15:22 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -299,9 +299,9 @@ LUA_API int lua_rawequal (lua_State *L, int index1, int index2) { | |||
299 | 299 | ||
300 | LUA_API void lua_arith (lua_State *L, int op) { | 300 | LUA_API void lua_arith (lua_State *L, int op) { |
301 | lua_lock(L); | 301 | lua_lock(L); |
302 | if (op != LUA_OPUNM) /* all other operations expect two operands */ | 302 | if (op != LUA_OPUNM && op != LUA_OPBNOT) |
303 | api_checknelems(L, 2); | 303 | api_checknelems(L, 2); /* all other operations expect two operands */ |
304 | else { /* for unary minus, add fake 2nd operand */ | 304 | else { /* for unary operations, add fake 2nd operand */ |
305 | api_checknelems(L, 1); | 305 | api_checknelems(L, 1); |
306 | setobjs2s(L, L->top, L->top - 1); | 306 | setobjs2s(L, L->top, L->top - 1); |
307 | L->top++; | 307 | L->top++; |