aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_record.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_record.c b/src/lj_record.c
index 6c64c645..8a123a61 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -527,9 +527,9 @@ static LoopEvent rec_for(jit_State *J, const BCIns *fori, int isforl)
527 TRef stop; 527 TRef stop;
528 IRType t; 528 IRType t;
529 /* Avoid semantic mismatches and always failing guards. */ 529 /* Avoid semantic mismatches and always failing guards. */
530 if (tvisnan(&tv[FORL_IDX]) || 530 if ((tvisnum(&tv[FORL_IDX]) && tvisnan(&tv[FORL_IDX])) ||
531 tvisnan(&tv[FORL_STOP]) || 531 (tvisnum(&tv[FORL_STOP]) && tvisnan(&tv[FORL_STOP])) ||
532 tvisnan(&tv[FORL_STEP]) || 532 (tvisnum(&tv[FORL_STEP]) && tvisnan(&tv[FORL_STEP])) ||
533 tvismzero(&tv[FORL_STEP])) 533 tvismzero(&tv[FORL_STEP]))
534 lj_trace_err(J, LJ_TRERR_GFAIL); 534 lj_trace_err(J, LJ_TRERR_GFAIL);
535 if (isforl) { /* Handle FORL/JFORL opcodes. */ 535 if (isforl) { /* Handle FORL/JFORL opcodes. */