1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-29 03:19:54 +00:00

Fix windows build issues.

This commit is contained in:
Calvin Rose 2019-07-12 08:47:11 -04:00
parent 894877a0e3
commit 2e6ee39506

View File

@ -21,6 +21,7 @@
*/ */
#ifndef JANET_AMALG #ifndef JANET_AMALG
#include <math.h>
#include <janet.h> #include <janet.h>
#include "util.h" #include "util.h"
#endif #endif
@ -184,7 +185,7 @@ void janet_memempty(JanetKV *mem, int32_t count) {
Janet janet_wrap_number_safe(double d) { Janet janet_wrap_number_safe(double d) {
Janet ret; Janet ret;
ret.number = isnan(d) ? (0.0 / 0.0) : d; ret.number = isnan(d) ? NAN : d;
return ret; return ret;
} }
@ -229,8 +230,7 @@ Janet janet_wrap_number(double x) {
} }
Janet janet_wrap_number_safe(double d) { Janet janet_wrap_number_safe(double d) {
Janet ret; double x = isnan(d) ? NAN : d;
double x = isnan(d) ? (0.0 / 0.0) : d;
return janet_wrap_number(x); return janet_wrap_number(x);
} }