summaryrefslogtreecommitdiff
path: root/interpret.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2022-09-19 18:51:28 +0300
committerArnold D. Robbins <arnold@skeeve.com>2022-09-19 18:51:28 +0300
commita3799ae3f5dd6648040d499224cc6dea61b355dd (patch)
treec8f5422c521fa89a32f58ef4f9c8c4f4806a9135 /interpret.h
parent8a026763c28ed67f8e195750caf1fe476794282b (diff)
downloadgawk-a3799ae3f5dd6648040d499224cc6dea61b355dd.tar.gz
Fix negative NaN issue on RiscV.
Diffstat (limited to 'interpret.h')
-rw-r--r--interpret.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/interpret.h b/interpret.h
index 26010ada..955d918f 100644
--- a/interpret.h
+++ b/interpret.h
@@ -583,6 +583,7 @@ uninitialized_scalar:
plus:
t1 = TOP_NUMBER();
r = make_number(t1->numbr + x2);
+ r->numbr = fix_nan_sign(t1->numbr, x2, r->numbr);
DEREF(t1);
REPLACE(r);
break;
@@ -597,6 +598,7 @@ plus:
minus:
t1 = TOP_NUMBER();
r = make_number(t1->numbr - x2);
+ r->numbr = fix_nan_sign(t1->numbr, x2, r->numbr);
DEREF(t1);
REPLACE(r);
break;