Ver Fonte

FFI: Fix for cdata vs. non-cdata arithmetic and comparisons.

Thanks to Roman Tsisyk.
Mike Pall há 11 anos atrás
pai
commit
247ead6718
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      src/lj_crecord.c

+ 1 - 0
src/lj_crecord.c

@@ -1434,6 +1434,7 @@ void LJ_FASTCALL recff_cdata_arith(jit_State *J, RecordFFData *rd)
       }
     } else if (!tref_isnum(tr)) {
       tr = 0;
+      ct = ctype_get(cts, CTID_P_VOID);
     }
   ok:
     s[i] = ct;