diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_ffrecord.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c index 4aa4f064..35e2e88e 100644 --- a/src/lj_ffrecord.c +++ b/src/lj_ffrecord.c | |||
| @@ -272,7 +272,7 @@ static void LJ_FASTCALL recff_tonumber(jit_State *J, RecordFFData *rd) | |||
| 272 | { | 272 | { |
| 273 | TRef tr = J->base[0]; | 273 | TRef tr = J->base[0]; |
| 274 | TRef base = J->base[1]; | 274 | TRef base = J->base[1]; |
| 275 | if (tr && base) { | 275 | if (tr && !tref_isnil(base)) { |
| 276 | base = lj_opt_narrow_toint(J, base); | 276 | base = lj_opt_narrow_toint(J, base); |
| 277 | if (!tref_isk(base) || IR(tref_ref(base))->i != 10) | 277 | if (!tref_isk(base) || IR(tref_ref(base))->i != 10) |
| 278 | recff_nyiu(J); | 278 | recff_nyiu(J); |
| @@ -657,7 +657,7 @@ static void LJ_FASTCALL recff_string_range(jit_State *J, RecordFFData *rd) | |||
| 657 | end = argv2int(J, &rd->argv[2]); | 657 | end = argv2int(J, &rd->argv[2]); |
| 658 | } | 658 | } |
| 659 | } else { /* string.byte(str, [,start [,end]]) */ | 659 | } else { /* string.byte(str, [,start [,end]]) */ |
| 660 | if (J->base[1]) { | 660 | if (!tref_isnil(J->base[1])) { |
| 661 | start = argv2int(J, &rd->argv[1]); | 661 | start = argv2int(J, &rd->argv[1]); |
| 662 | trstart = lj_opt_narrow_toint(J, J->base[1]); | 662 | trstart = lj_opt_narrow_toint(J, J->base[1]); |
| 663 | trend = J->base[2]; | 663 | trend = J->base[2]; |
| @@ -750,7 +750,7 @@ static void LJ_FASTCALL recff_table_remove(jit_State *J, RecordFFData *rd) | |||
| 750 | TRef tab = J->base[0]; | 750 | TRef tab = J->base[0]; |
| 751 | rd->nres = 0; | 751 | rd->nres = 0; |
| 752 | if (tref_istab(tab)) { | 752 | if (tref_istab(tab)) { |
| 753 | if (!J->base[1] || tref_isnil(J->base[1])) { /* Simple pop: t[#t] = nil */ | 753 | if (tref_isnil(J->base[1])) { /* Simple pop: t[#t] = nil */ |
| 754 | TRef trlen = lj_ir_call(J, IRCALL_lj_tab_len, tab); | 754 | TRef trlen = lj_ir_call(J, IRCALL_lj_tab_len, tab); |
| 755 | GCtab *t = tabV(&rd->argv[0]); | 755 | GCtab *t = tabV(&rd->argv[0]); |
| 756 | MSize len = lj_tab_len(t); | 756 | MSize len = lj_tab_len(t); |
