From 0e10313d64f54dd587ebbcd5f413bd999333c911 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 24 Nov 2024 16:13:23 -0500 Subject: Switch `NaN` to be identical to the null value --- stdlib/optionals.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stdlib/optionals.c') 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) -- cgit v1.2.3