ENH: ISstream : read float (without .) larger than allowable integer
This commit is contained in:
parent
1332dad655
commit
e4aca56a21
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user