fix overread (consuming an extra byte) scanning NAN
bug detected by glib test suite
This commit is contained in:
parent
c613125966
commit
33e7781b5b
1 changed files with 1 additions and 1 deletions
|
|
@ -436,7 +436,7 @@ long double __floatscan(FILE *f, int prec, int pok)
|
||||||
return sign * INFINITY;
|
return sign * INFINITY;
|
||||||
}
|
}
|
||||||
if (!i) for (i=0; i<3 && (c|32)=="nan"[i]; i++)
|
if (!i) for (i=0; i<3 && (c|32)=="nan"[i]; i++)
|
||||||
if (i<3) c = shgetc(f);
|
if (i<2) c = shgetc(f);
|
||||||
if (i==3) {
|
if (i==3) {
|
||||||
return NAN;
|
return NAN;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue