From 5f08a50506d47813edacd78b688af31da4bc4ce2 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Fri, 15 Apr 2011 19:02:47 +0200 Subject: [PATCH] FFI: Fix arithmetic ctype metamethods for references. --- src/lj_ctype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_ctype.c b/src/lj_ctype.c index 0b59b48d..85e9a0ba 100644 --- a/src/lj_ctype.c +++ b/src/lj_ctype.c @@ -311,7 +311,7 @@ cTValue *lj_ctype_meta(CTState *cts, CTypeID id, MMS mm) { CType *ct = ctype_get(cts, id); cTValue *tv; - while (ctype_isattrib(ct->info)) { + while (ctype_isattrib(ct->info) || ctype_isref(ct->info)) { id = ctype_cid(ct->info); ct = ctype_get(cts, id); }