Commit e4aca56a authored by mattijs's avatar mattijs
Browse files

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

parent 1332dad6
......@@ -252,7 +252,7 @@ Foam::Istream& Foam::ISstream::read(token& t)
}
else
{
char *endptr;
char *endptr = NULL;
if (asLabel)
{
......@@ -260,7 +260,7 @@ Foam::Istream& Foam::ISstream::read(token& t)
t = label(longVal);
// 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));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment