aboutsummaryrefslogtreecommitdiffstats
path: root/liblll/CodeFragment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'liblll/CodeFragment.cpp')
-rw-r--r--liblll/CodeFragment.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp
index f143ca43..1bf587ce 100644
--- a/liblll/CodeFragment.cpp
+++ b/liblll/CodeFragment.cpp
@@ -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)