Browse Source

Add missing guard for check against "#" when recording select().

Mike Pall 14 years ago
parent
commit
870bcd7640
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/lj_ffrecord.c

+ 2 - 2
src/lj_ffrecord.c

@@ -207,11 +207,11 @@ int32_t lj_ffrecord_select_mode(jit_State *J, TRef tr, TValue *tv)
 {
   if (tref_isstr(tr) && *strVdata(tv) == '#') {  /* select('#', ...) */
     if (strV(tv)->len == 1) {
-      emitir(IRT(IR_EQ, IRT_STR), tr, lj_ir_kstr(J, strV(tv)));
+      emitir(IRTG(IR_EQ, IRT_STR), tr, lj_ir_kstr(J, strV(tv)));
     } else {
       TRef trptr = emitir(IRT(IR_STRREF, IRT_P32), tr, 0);
       TRef trchar = emitir(IRT(IR_XLOAD, IRT_U8), trptr, IRXLOAD_READONLY);
-      emitir(IRT(IR_EQ, IRT_INT), trchar, lj_ir_kint(J, '#'));
+      emitir(IRTG(IR_EQ, IRT_INT), trchar, lj_ir_kint(J, '#'));
     }
     return 0;
   } else {  /* select(n, ...) */