ENH: ISstream : read float (without .) larger than allowable integer

This commit is contained in:
mattijs
2010-09-29 12:07:31 +01:00
parent 1332dad655
commit e4aca56a21

View File

@ -252,7 +252,7 @@ Foam::Istream& Foam::ISstream::read(token& t)
} }
else else
{ {
char *endptr; char *endptr = NULL;
if (asLabel) if (asLabel)
{ {
@ -260,7 +260,7 @@ Foam::Istream& Foam::ISstream::read(token& t)
t = label(longVal); t = label(longVal);
// return as a scalar if doesn't fit in a label // return as a scalar if doesn't fit in a label
if (t.labelToken() != longVal) if (*endptr || t.labelToken() != longVal)
{ {
t = scalar(strtod(buf, &endptr)); t = scalar(strtod(buf, &endptr));
} }