mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
LLL: only support variable length bigendian numbers in LIT
This commit is contained in:
parent
6d97a56af1
commit
75b1ae8910
@ -297,21 +297,10 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s)
|
||||
bigint bi = *i.get<bigint*>();
|
||||
if (bi < 0)
|
||||
error<IntegerOutOfRange>();
|
||||
else if (bi > bigint(u256(0) - 1))
|
||||
{
|
||||
if (ii == 2 && _t.size() == 3)
|
||||
{
|
||||
// One big int - allow it as hex.
|
||||
data.resize(bytesRequired(bi));
|
||||
toBigEndian(bi, data);
|
||||
}
|
||||
else
|
||||
error<IntegerOutOfRange>();
|
||||
}
|
||||
else
|
||||
{
|
||||
data.resize(data.size() + 32);
|
||||
*(h256*)(&data.back() - 31) = (u256)bi;
|
||||
bytes tmp = toCompactBigEndian(bi);
|
||||
data.insert(data.end(), tmp.begin(), tmp.end());
|
||||
}
|
||||
}
|
||||
else if (ii)
|
||||
|
Loading…
Reference in New Issue
Block a user