Browse Source

bug fixes

cl-refactor
yann300 10 years ago
committed by yann300
parent
commit
d5e3f6f098
  1. 7
      libdevcore/CommonJS.cpp

7
libdevcore/CommonJS.cpp

@ -60,15 +60,12 @@ bytes unpadded(bytes _b)
bytes unpadLeft(bytes _b) bytes unpadLeft(bytes _b)
{ {
int i = 0; unsigned int i = 0;
if (_b.size() == 0) if (_b.size() == 0)
return _b; return _b;
while (true) while (i < _b.size() && _b[i] == byte(0))
if (_b.at(i) == byte(0))
i++; i++;
else
break;
if (i != 0) if (i != 0)
_b.erase(_b.begin(), _b.begin() + i); _b.erase(_b.begin(), _b.begin() + i);

Loading…
Cancel
Save