summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mruby/value.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/mruby/value.h b/include/mruby/value.h
index adc6b6d44..6cbe95509 100644
--- a/include/mruby/value.h
+++ b/include/mruby/value.h
@@ -134,7 +134,12 @@ mrb_float_value(mrb_float f)
{
mrb_value v;
- v.f = f;
+ if (f != f) {
+ v.ttt = 0x7ff80000;
+ v.value.i = 0;
+ } else {
+ v.f = f;
+ }
return v;
}
#endif /* MRB_NAN_BOXING */