diff --git a/dist/nawk/tran.c b/dist/nawk/tran.c index 15874f21ed47..9feb0e0265d5 100644 --- a/dist/nawk/tran.c +++ b/dist/nawk/tran.c @@ -285,6 +285,7 @@ Awkfloat setfval(Cell *vp, Awkfloat f) /* set float val of a Cell */ { int fldno; + f += 0.0; /* normalise negative zero to positive zero */ if ((vp->tval & (NUM | STR)) == 0) funnyvar(vp, "assign to"); if (isfld(vp)) {