Browse Source

Fix for 32-byte names.

cl-refactor
Gav Wood 11 years ago
parent
commit
1d7cdf2366
  1. 3
      alethzero/MainWin.cpp

3
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();

Loading…
Cancel
Save