aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-01-29 11:23:45 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-01-29 11:23:45 -0200
commit383a6e88f93c88973d14ac1c2dc85ff36bc2cbdc (patch)
tree008b2e9a7c467269c57fb2085bfc5d45d7b4e181
parent871166d7dbe987dafc074e5e55802202ec2a1963 (diff)
downloadlua-383a6e88f93c88973d14ac1c2dc85ff36bc2cbdc.tar.gz
lua-383a6e88f93c88973d14ac1c2dc85ff36bc2cbdc.tar.bz2
lua-383a6e88f93c88973d14ac1c2dc85ff36bc2cbdc.zip
argv[0] may be NULL
-rw-r--r--lua.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua.c b/lua.c
index dae52fc1..c9e903e0 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.114 2003/01/17 15:27:28 roberto Exp roberto $ 2** $Id: lua.c,v 1.115 2003/01/29 10:27:07 roberto Exp roberto $
3** Lua stand-alone interpreter 3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -397,7 +397,7 @@ static int pmain (lua_State *l) {
397 struct Smain *s = (struct Smain *)lua_touserdata(l, 1); 397 struct Smain *s = (struct Smain *)lua_touserdata(l, 1);
398 int status; 398 int status;
399 int interactive = 0; 399 int interactive = 0;
400 if (s->argv[0][0] != '\0') progname = s->argv[0]; 400 if (s->argv[0] && s->argv[0][0]) progname = s->argv[0];
401 L = l; 401 L = l;
402 lua_userinit(l); /* open libraries */ 402 lua_userinit(l); /* open libraries */
403 status = handle_luainit(); 403 status = handle_luainit();