mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-20 20:54:59 -07:00
Merge pull request #5038 from mtarik34b/noteq-comparison-for-nan-must-be-true
Ensure `NaN != any_float_value` evaluates to true for constant NaN values
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
switch (op) {
|
||||
|
||||
Reference in New Issue
Block a user