aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-06-16 10:44:36 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-06-16 10:44:36 -0300
commit409741e900d4c13a432f5a768554add1ed2426fa (patch)
treef6bf79c476e5922113f49a5ceba95c7e53294be1 /ldebug.c
parentb98de30b8f52986fae7ad84d4622d16fef6872b8 (diff)
downloadlua-409741e900d4c13a432f5a768554add1ed2426fa.tar.gz
lua-409741e900d4c13a432f5a768554add1ed2426fa.tar.bz2
lua-409741e900d4c13a432f5a768554add1ed2426fa.zip
'what' may be NULL in 'kname'
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldebug.c b/ldebug.c
index 9b3e2d1c..304e5708 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.69 2010/04/08 17:06:33 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.70 2010/04/13 20:48:12 roberto Exp roberto $
3** Debug Interface 3** Debug Interface
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -264,7 +264,7 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) {
264 264
265static void kname (Proto *p, int c, int reg, const char *what, 265static void kname (Proto *p, int c, int reg, const char *what,
266 const char **name) { 266 const char **name) {
267 if (c == reg && *what == 'c') 267 if (c == reg && what && *what == 'c')
268 return; /* index is a constant; name already correct */ 268 return; /* index is a constant; name already correct */
269 else if (ISK(c) && ttisstring(&p->k[INDEXK(c)])) 269 else if (ISK(c) && ttisstring(&p->k[INDEXK(c)]))
270 *name = svalue(&p->k[INDEXK(c)]); 270 *name = svalue(&p->k[INDEXK(c)]);