aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/optionals.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-28 13:46:35 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-28 13:46:35 -0400
commit9bc18cb6174ff563c18a1ca9b462c58971b51733 (patch)
treee57e42ed40d1ffa1e6c402841f32b7efdd910796 /src/stdlib/optionals.c
parenta79b3c2216d386e705603c6dcbf10c1c391fcd99 (diff)
Fix some minor floating point promotion issues
Diffstat (limited to 'src/stdlib/optionals.c')
-rw-r--r--src/stdlib/optionals.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stdlib/optionals.c b/src/stdlib/optionals.c
index d91ebffc..462b2df2 100644
--- a/src/stdlib/optionals.c
+++ b/src/stdlib/optionals.c
@@ -81,9 +81,9 @@ public void Optional$deserialize(FILE *in, void *outval, Array_t *pointers, cons
else if (nonnull->tag == TableInfo)
*(Table_t*)outval = (Table_t){.entries={.length=-1}};
else if (nonnull == &Num$info)
- *(double*)outval = NAN;
+ *(double*)outval = (double)NAN;
else if (nonnull == &Num32$info)
- *(float*)outval = NAN;
+ *(float*)outval = (float)NAN;
else if (nonnull->tag == StructInfo || (nonnull->tag == OpaqueInfo && type->size > nonnull->size))
memset(outval + type->size, -1, (size_t)(type->size - nonnull->size));
else