Explorar o código

FFI: Fix arithmetic ctype metamethods for references.

Mike Pall %!s(int64=14) %!d(string=hai) anos
pai
achega
5f08a50506
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/lj_ctype.c

+ 1 - 1
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);
   }