From 46fcf3b03c66b793b0d05d8dcba52792d1caadda Mon Sep 17 00:00:00 2001 From: Tim Hughes Date: Fri, 28 Feb 2014 16:43:39 +0000 Subject: [PATCH 1/3] Disable "unknown pragma" warning on VS 2013. --- windows/LibEthereum.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/LibEthereum.props b/windows/LibEthereum.props index b8c79c9fd..3de930166 100644 --- a/windows/LibEthereum.props +++ b/windows/LibEthereum.props @@ -10,7 +10,7 @@ - 4100;4127;4258;4505;4512;4706 + 4068;4100;4127;4258;4505;4512;4706 Level4 true false From 9001a887f07e50d27c1bd27e33f0211151eb6891 Mon Sep 17 00:00:00 2001 From: Tim Hughes Date: Fri, 28 Feb 2014 16:49:34 +0000 Subject: [PATCH 2/3] Fix implicit size_t->int conversion. --- libethereum/Instruction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libethereum/Instruction.cpp b/libethereum/Instruction.cpp index 8ed8cc43f..660747cfe 100644 --- a/libethereum/Instruction.cpp +++ b/libethereum/Instruction.cpp @@ -499,7 +499,7 @@ static bool compileLispFragment(char const*& d, char const* e, bool _quiet, u256 while (d != e && compileLispFragment(d, e, _quiet, codes.back().first, codes.back().second)) codes.push_back(pair>()); codes.pop_back(); - int i = codes.size(); + int i = (int)codes.size(); if (i > 2) cwarn << "Greater than two arguments given to binary operator" << t << "; using first two only."; for (auto it = codes.rbegin(); it != codes.rend(); ++it) @@ -518,7 +518,7 @@ static bool compileLispFragment(char const*& d, char const* e, bool _quiet, u256 while (d != e && compileLispFragment(d, e, _quiet, codes.back().first, codes.back().second)) codes.push_back(pair>()); codes.pop_back(); - int i = codes.size(); + int i = (int)codes.size(); if (i > 1) cwarn << "Greater than one argument given to unary operator" << t << "; using first only."; for (auto it = codes.rbegin(); it != codes.rend(); ++it) From 1d7cdf2366eb61cb86d89ee1c3312dbf7f2b0a82 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 1 Mar 2014 00:39:36 +0000 Subject: [PATCH 3/3] Fix for 32-byte names. --- alethzero/MainWin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index 1b8db3bcf..475c6cffd 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -148,7 +148,8 @@ QString Main::pretty(eth::Address _a) const if (h256 n = state().contractMemory(m_nameReg, (h256)(u256)(u160)_a)) { std::string s((char const*)n.data(), 32); - s.resize(s.find_first_of('\0')); + if (s.find_first_of('\0') != string::npos) + s.resize(s.find_first_of('\0')); return QString::fromStdString(s); } return QString();