mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Convert integers which overflow label to scalar.
This commit is contained in:
@ -224,7 +224,16 @@ Foam::Istream& Foam::ISstream::read(token& t)
|
||||
}
|
||||
else
|
||||
{
|
||||
t = label(atol(numberBuffer));
|
||||
long lt = atol(numberBuffer);
|
||||
t = label(lt);
|
||||
|
||||
// If the integer is too large to be represented as a label
|
||||
// return it as a scalar
|
||||
if (t.labelToken() != lt)
|
||||
{
|
||||
isScalar = true;
|
||||
t = scalar(atof(numberBuffer));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user