1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-08 03:23:01 +00:00

Address issue #142

Also add janet_wrap_number_safe to API.
This commit is contained in:
Calvin Rose
2019-07-12 07:19:29 -05:00
parent 6887dd05f6
commit 894877a0e3
6 changed files with 43 additions and 3 deletions

View File

@@ -1070,7 +1070,7 @@ static const uint8_t *unmarshal_one(
#else
memcpy(&u.bytes, data + 1, sizeof(double));
#endif
*out = janet_wrap_number(u.d);
*out = janet_wrap_number_safe(u.d);
janet_v_push(st->lookup, *out);
return data + 9;
}