diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-24 16:13:23 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-24 16:13:23 -0500 |
| commit | 0e10313d64f54dd587ebbcd5f413bd999333c911 (patch) | |
| tree | 16a07c4b01467d59807611b23f91f9eb125959e2 /stdlib/optionals.c | |
| parent | 6ecf6a272446af04f3affd354520d21127a5b952 (diff) | |
Switch `NaN` to be identical to the null value
Diffstat (limited to 'stdlib/optionals.c')
| -rw-r--r-- | stdlib/optionals.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/stdlib/optionals.c b/stdlib/optionals.c index b6a5989e..8c295228 100644 --- a/stdlib/optionals.c +++ b/stdlib/optionals.c @@ -21,6 +21,8 @@ public PUREFUNC bool is_null(const void *obj, const TypeInfo_t *non_optional_typ return *((OptionalBool_t*)obj) == NULL_BOOL; else if (non_optional_type == &Num$info) return isnan(*((Num_t*)obj)); + else if (non_optional_type == &Num32$info) + return isnan(*((Num32_t*)obj)); else if (non_optional_type == &Int64$info) return ((OptionalInt64_t*)obj)->is_null; else if (non_optional_type == &Int32$info) |
