diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-06-16 10:44:36 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-06-16 10:44:36 -0300 |
commit | 409741e900d4c13a432f5a768554add1ed2426fa (patch) | |
tree | f6bf79c476e5922113f49a5ceba95c7e53294be1 /ldebug.c | |
parent | b98de30b8f52986fae7ad84d4622d16fef6872b8 (diff) | |
download | lua-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 | ||
265 | static void kname (Proto *p, int c, int reg, const char *what, | 265 | static 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)]); |