From c2f065f405ac7cc27bcfcc9b2b44ac53b666efde Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 11 Jul 2005 15:48:02 -0300 Subject: detail --- lobject.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lobject.c') diff --git a/lobject.c b/lobject.c index 4fe5fdb4..fd522394 100644 --- a/lobject.c +++ b/lobject.c @@ -1,5 +1,5 @@ /* -** $Id: lobject.c,v 2.14 2005/05/20 15:53:42 roberto Exp roberto $ +** $Id: lobject.c,v 2.15 2005/05/31 14:25:18 roberto Exp roberto $ ** Some generic functions over Lua objects ** See Copyright Notice in lua.h */ @@ -116,7 +116,9 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) { incr_top(L); switch (*(e+1)) { case 's': { - pushstr(L, va_arg(argp, char *)); + const char *s = va_arg(argp, char *); + if (s == NULL) s = "(null)"; + pushstr(L, s); break; } case 'c': { -- cgit v1.2.3-55-g6feb