Pt 166696064 decode calldata fate #168

Merged
zxq9 merged 5 commits from PT-166696064-decode-calldata-fate into master 2019-06-20 20:05:44 +09:00
Showing only changes of commit 1fda6912da - Show all commits

View File

@ -373,6 +373,7 @@ deserialize2(<<?POS_BITS, Rest/binary>>) ->
{?FATE_BITS(Bint), Rest2}; {?FATE_BITS(Bint), Rest2};
deserialize2(<<?LONG_STRING, Rest/binary>>) -> deserialize2(<<?LONG_STRING, Rest/binary>>) ->
{S, Rest2} = deserialize_one(Rest), {S, Rest2} = deserialize_one(Rest),
true = is_integer(S) andalso S >= 0,
Size = S + ?SHORT_STRING_SIZE, Size = S + ?SHORT_STRING_SIZE,
String = binary:part(Rest2, 0, Size), String = binary:part(Rest2, 0, Size),
Rest3 = binary:part(Rest2, byte_size(Rest2), - (byte_size(Rest2) - Size)), Rest3 = binary:part(Rest2, byte_size(Rest2), - (byte_size(Rest2) - Size)),