diff options
Diffstat (limited to 'lobject.c')
-rw-r--r-- | lobject.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.c,v 2.14 2005/05/20 15:53:42 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 2.15 2005/05/31 14:25:18 roberto Exp roberto $ |
3 | ** Some generic functions over Lua objects | 3 | ** Some generic functions over Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -116,7 +116,9 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) { | |||
116 | incr_top(L); | 116 | incr_top(L); |
117 | switch (*(e+1)) { | 117 | switch (*(e+1)) { |
118 | case 's': { | 118 | case 's': { |
119 | pushstr(L, va_arg(argp, char *)); | 119 | const char *s = va_arg(argp, char *); |
120 | if (s == NULL) s = "(null)"; | ||
121 | pushstr(L, s); | ||
120 | break; | 122 | break; |
121 | } | 123 | } |
122 | case 'c': { | 124 | case 'c': { |