1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-25 22:53:16 +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
#include <math.h>
#include <janet.h>
#include "util.h"
#endif
@ -184,7 +185,7 @@ void janet_memempty(JanetKV *mem, int32_t count) {
Janet janet_wrap_number_safe(double d) {
Janet ret;
ret.number = isnan(d) ? (0.0 / 0.0) : d;
ret.number = isnan(d) ? NAN : d;
return ret;
}
@ -229,8 +230,7 @@ Janet janet_wrap_number(double x) {
}
Janet janet_wrap_number_safe(double d) {
Janet ret;
double x = isnan(d) ? (0.0 / 0.0) : d;
double x = isnan(d) ? NAN : d;
return janet_wrap_number(x);
}