From 409741e900d4c13a432f5a768554add1ed2426fa Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 16 Jun 2010 10:44:36 -0300 Subject: 'what' may be NULL in 'kname' --- ldebug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index 9b3e2d1c..304e5708 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.69 2010/04/08 17:06:33 roberto Exp roberto $ +** $Id: ldebug.c,v 2.70 2010/04/13 20:48:12 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -264,7 +264,7 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) { static void kname (Proto *p, int c, int reg, const char *what, const char **name) { - if (c == reg && *what == 'c') + if (c == reg && what && *what == 'c') return; /* index is a constant; name already correct */ else if (ISK(c) && ttisstring(&p->k[INDEXK(c)])) *name = svalue(&p->k[INDEXK(c)]); -- cgit v1.2.3-55-g6feb