diff options
| -rw-r--r-- | opcode.c | 13 |
1 files changed, 9 insertions, 4 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.57 1996/02/12 18:32:40 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.58 1996/02/22 20:34:33 roberto Exp roberto $"; |
| 7 | 7 | ||
| 8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
| 9 | #include <stdlib.h> | 9 | #include <stdlib.h> |
| @@ -784,9 +784,14 @@ void lua_pushnumber (real n) | |||
| 784 | */ | 784 | */ |
| 785 | void lua_pushstring (char *s) | 785 | void lua_pushstring (char *s) |
| 786 | { | 786 | { |
| 787 | tsvalue(top) = lua_createstring(s); | 787 | if (s == NULL) |
| 788 | tag(top) = LUA_T_STRING; | 788 | tag(top) = LUA_T_NIL; |
| 789 | incr_top; | 789 | else |
| 790 | { | ||
| 791 | tsvalue(top) = lua_createstring(s); | ||
| 792 | tag(top) = LUA_T_STRING; | ||
| 793 | } | ||
| 794 | incr_top; | ||
| 790 | } | 795 | } |
| 791 | 796 | ||
| 792 | /* | 797 | /* |
