aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorTim Hughes <tim@twistedfury.com>2014-01-17 18:11:42 +0800
committerTim Hughes <tim@twistedfury.com>2014-01-17 18:11:42 +0800
commit16eddcb35d4f484a9210e4d3961b12b5468dd3d3 (patch)
treec685d50de648ad3ef22ffdca00fa38f07e9ea714 /main.cpp
parent9435aabbacfdeacf42ab8a24f918c2f6c87318f2 (diff)
downloaddexon-solidity-16eddcb35d4f484a9210e4d3961b12b5468dd3d3.tar.gz
dexon-solidity-16eddcb35d4f484a9210e4d3961b12b5468dd3d3.tar.zst
dexon-solidity-16eddcb35d4f484a9210e4d3961b12b5468dd3d3.zip
Fixed assert in test/main.cpp (using a .data() from temporary string after it was destroyed).
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index df9c3ba8..0613bd27 100644
--- a/main.cpp
+++ b/main.cpp
@@ -204,7 +204,8 @@ int main()
assert(asString(rlp("dog")) == "\x43""dog");
// 2-item list
- RLP twoItemList("\x82\x0f\x43""dog");
+ string twoItemListString = "\x82\x0f\x43""dog";
+ RLP twoItemList(twoItemListString);
assert(twoItemList.itemCount() == 2);
assert(twoItemList[0] == 15);
assert(twoItemList[1] == "dog");