From 4a144625c90db7497dd3fce79b97be39ef0af773 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 11 Oct 2011 11:51:48 +0200 Subject: [PATCH] FFI: Fix recording of const/enum lookups in namespaces. --- src/lj_crecord.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 8d2248a4..96b62efe 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c @@ -1031,7 +1031,7 @@ void LJ_FASTCALL recff_clib_index(jit_State *J, RecordFFData *rd) CType *ct; CTypeID id = lj_ctype_getname(cts, &ct, name, CLNS_INDEX); cTValue *tv = lj_tab_getstr(cl->cache, name); - if (id && tv && tviscdata(tv)) { + if (id && tv && !tvisnil(tv)) { /* Specialize to the symbol name and make the result a constant. */ emitir(IRTG(IR_EQ, IRT_STR), J->base[1], lj_ir_kstr(J, name)); if (ctype_isconstval(ct->info)) { -- 2.11.4.GIT