Commit 1bc097af authored by henry's avatar henry
Browse files

Convert integers which overflow label to scalar.

parent 2ffe3eaa
......@@ -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
......
Supports Markdown
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