Browse Source

Fix for 32-byte names.

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

1
alethzero/MainWin.cpp

@ -148,6 +148,7 @@ QString Main::pretty(eth::Address _a) const
if (h256 n = state().contractMemory(m_nameReg, (h256)(u256)(u160)_a)) if (h256 n = state().contractMemory(m_nameReg, (h256)(u256)(u160)_a))
{ {
std::string s((char const*)n.data(), 32); std::string s((char const*)n.data(), 32);
if (s.find_first_of('\0') != string::npos)
s.resize(s.find_first_of('\0')); s.resize(s.find_first_of('\0'));
return QString::fromStdString(s); return QString::fromStdString(s);
} }

Loading…
Cancel
Save