mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: ISstream : read float (without .) larger than allowable integer
This commit is contained in:
@ -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));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user