mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fixed assert in test/main.cpp (using a .data() from temporary string after it was destroyed).
This commit is contained in:
parent
9435aabbac
commit
16eddcb35d
3
main.cpp
3
main.cpp
@ -204,7 +204,8 @@ int main()
|
|||||||
assert(asString(rlp("dog")) == "\x43""dog");
|
assert(asString(rlp("dog")) == "\x43""dog");
|
||||||
|
|
||||||
// 2-item list
|
// 2-item list
|
||||||
RLP twoItemList("\x82\x0f\x43""dog");
|
string twoItemListString = "\x82\x0f\x43""dog";
|
||||||
|
RLP twoItemList(twoItemListString);
|
||||||
assert(twoItemList.itemCount() == 2);
|
assert(twoItemList.itemCount() == 2);
|
||||||
assert(twoItemList[0] == 15);
|
assert(twoItemList[0] == 15);
|
||||||
assert(twoItemList[1] == "dog");
|
assert(twoItemList[1] == "dog");
|
||||||
|
Loading…
Reference in New Issue
Block a user