about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/internal/floatscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c
index 68f576c9..bba5753b 100644
--- a/src/internal/floatscan.c
+++ b/src/internal/floatscan.c
@@ -199,11 +199,11 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
 		}
 		if (carry) {
 			rp += 9;
+			a = (a-1 & MASK);
 			if (a == z) {
 				z = (z-1 & MASK);
 				x[z-1 & MASK] |= x[z];
 			}
-			a = (a-1 & MASK);
 			x[a] = carry;
 		}
 	}