diff options
Diffstat (limited to 'opcode.c')
-rw-r--r-- | opcode.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_opcode="$Id: opcode.c,v 3.17 1994/11/17 21:23:43 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.18 1994/11/18 19:46:21 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
9 | #include <stdio.h> | 9 | #include <stdio.h> |
@@ -989,7 +989,10 @@ static int lua_execute (Byte *pc, int base) | |||
989 | 989 | ||
990 | case MINUSOP: | 990 | case MINUSOP: |
991 | if (tonumber(top-1)) | 991 | if (tonumber(top-1)) |
992 | do_call(&luaI_fallBacks[FB_UNMINUS].function, (top-stack)-1, 1, (top-stack)-1); | 992 | { |
993 | tag(top++) = LUA_T_NIL; | ||
994 | call_arith("unm"); | ||
995 | } | ||
993 | else | 996 | else |
994 | nvalue(top-1) = - nvalue(top-1); | 997 | nvalue(top-1) = - nvalue(top-1); |
995 | break; | 998 | break; |