musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/internal/floatscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/floatscan.c')
-rw-r--r--src/internal/floatscan.c 4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c
index ed735278..000706d7 100644
--- a/src/internal/floatscan.c
+++ b/src/internal/floatscan.c
@@ -225,8 +225,10 @@ static long double decfloat(FILE *f, int bits, int emin, int sign, int pok)
}
}
- for (y=i=0; i<LD_B1B_DIG && (a+i & MASK)!=z; i++)
+ for (y=i=0; i<LD_B1B_DIG; i++) {
+ if ((a+i & MASK)==z) x[z=(z+1 & MASK)] = 0;
y = 1000000000.0L * y + x[a+i & MASK];
+ }
y *= sign;
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月19日 00:41:51 +0000

AltStyle によって変換されたページ (->オリジナル) /