Browse Source

Fix recording of ctype() constructors for pointers.

Mike Pall 13 years ago
parent
commit
90ec1f90d0
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/lj_crecord.c

+ 1 - 2
src/lj_crecord.c

@@ -944,8 +944,7 @@ void LJ_FASTCALL recff_cdata_call(jit_State *J, RecordFFData *rd)
   }
   /* Record ctype __call/__new metamethod. */
   ct = ctype_raw(cts, id);
-  if (ctype_isptr(ct->info)) id = ctype_cid(ct->info);
-  tv = lj_ctype_meta(cts, id, mm);
+  tv = lj_ctype_meta(cts, ctype_isptr(ct->info) ? ctype_cid(ct->info) : id, mm);
   if (tv) {
     if (tvisfunc(tv)) {
       J->base[-1] = lj_ir_kfunc(J, funcV(tv)) | TREF_FRAME;