summaryrefslogtreecommitdiff
path: root/opcode.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-12-16 14:08:34 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1994-12-16 14:08:34 -0200
commitfe8338335dfb4bf37e6b164cb55bfcc94ec6563d (patch)
treecf87169bfa5f58313b775c98cf9690d254dbbd37 /opcode.c
parent068d1cd1eea8a90bca09352085c8ac14b0773490 (diff)
downloadlua-github-fe8338335dfb4bf37e6b164cb55bfcc94ec6563d.tar.gz
a field with value 'nil' must call the fallback 'index'
Diffstat (limited to 'opcode.c')
-rw-r--r--opcode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/opcode.c b/opcode.c
index 2c7a293e..c31e9f99 100644
--- a/opcode.c
+++ b/opcode.c
@@ -3,7 +3,7 @@
** TecCGraf - PUC-Rio
*/
-char *rcs_opcode="$Id: opcode.c,v 3.25 1994/12/13 15:54:21 roberto Exp roberto $";
+char *rcs_opcode="$Id: opcode.c,v 3.26 1994/12/16 15:56:45 roberto Exp roberto $";
#include <setjmp.h>
#include <stdio.h>
@@ -269,7 +269,7 @@ static void pushsubscript (void)
else
{
Object *h = lua_hashget(avalue(top-2), top-1);
- if (h == NULL)
+ if (h == NULL || tag(h) == LUA_T_NIL)
do_call(&luaI_fallBacks[FB_INDEX].function, (top-stack)-2, 1, (top-stack)-2);
else
{