projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f4de35
)
remove redundant (unmaintained) check in floatscan
author
Rich Felker
<dalias@aerifal.cx>
Sun, 22 Apr 2012 18:05:12 +0000
(14:05 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sun, 22 Apr 2012 18:05:12 +0000
(14:05 -0400)
also be extra careful to avoid wrapping the circular buffer early
src/internal/floatscan.c
patch
|
blob
|
history
diff --git
a/src/internal/floatscan.c
b/src/internal/floatscan.c
index aa962f41efb5676f56b9910dee38422c1e469869..f80db3839ea87ec2d0513f6c4f4bb1eff0aba05e 100644
(file)
--- a/
src/internal/floatscan.c
+++ b/
src/internal/floatscan.c
@@
-89,7
+89,7
@@
static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
if (gotrad) break;
gotrad = 1;
lrp = dc;
- } else if (k < KMAX-
2
) {
+ } else if (k < KMAX-
3
) {
dc++;
if (c!='0') lnz = dc;
if (j) x[k] = x[k]*10 + c-'0';
@@
-101,7
+101,7
@@
static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
gotdig=1;
} else {
dc++;
- if (c!='0') x[KMAX-
3
] |= 1;
+ if (c!='0') x[KMAX-
4
] |= 1;
}
}
if (!gotrad) lrp=dc;
@@
-143,7
+143,7
@@
static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
}
/* Align incomplete final B1B digit */
- if (
k<KMAX &&
j) {
+ if (j) {
for (; j<9; j++) x[k]*=10;
k++;
j=0;