Ensure NaN != any_float_value evaluates to true for constant NaN values

This commit is contained in:
mtarik34b
2025-04-15 05:00:36 +02:00
parent 11da543f26
commit 313d7d84bc
2 changed files with 36 additions and 22 deletions

View File

@@ -955,7 +955,7 @@ gb_internal bool compare_exact_values(TokenKind op, ExactValue x, ExactValue y)
f64 a = x.value_float;
f64 b = y.value_float;
if (isnan(a) || isnan(b)) {
return false; // Fixes #5004
return op == Token_NotEq; // Fixes #5004
}
switch (op) {