normalize NaN after division that may generate NaN; fix #1712

parent 8b93f859
......@@ -7,6 +7,7 @@
#include <setjmp.h>
#include <stddef.h>
#include <stdarg.h>
#include <math.h>
#include "mruby.h"
#include "mruby/array.h"
#include "mruby/class.h"
......@@ -1712,6 +1713,11 @@ mrb_context_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int
default:
goto L_SEND;
}
#ifdef MRB_NAN_BOXING
if (isnan(regs[a].attr_f)) {
regs[a] = mrb_float_value(mrb, regs[a].attr_f);
}
#endif
NEXT;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment