mirror of https://github.com/rusefi/lua.git
small change to avoid error on "lua_pushstring(NULL)".
This commit is contained in:
parent
74102bd716
commit
6f30fa98d8
7
opcode.c
7
opcode.c
|
@ -3,7 +3,7 @@
|
||||||
** TecCGraf - PUC-Rio
|
** TecCGraf - PUC-Rio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *rcs_opcode="$Id: opcode.c,v 3.57 1996/02/12 18:32:40 roberto Exp roberto $";
|
char *rcs_opcode="$Id: opcode.c,v 3.58 1996/02/22 20:34:33 roberto Exp roberto $";
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -784,8 +784,13 @@ void lua_pushnumber (real n)
|
||||||
*/
|
*/
|
||||||
void lua_pushstring (char *s)
|
void lua_pushstring (char *s)
|
||||||
{
|
{
|
||||||
|
if (s == NULL)
|
||||||
|
tag(top) = LUA_T_NIL;
|
||||||
|
else
|
||||||
|
{
|
||||||
tsvalue(top) = lua_createstring(s);
|
tsvalue(top) = lua_createstring(s);
|
||||||
tag(top) = LUA_T_STRING;
|
tag(top) = LUA_T_STRING;
|
||||||
|
}
|
||||||
incr_top;
|
incr_top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue