Browse Source

Null RLP fix.

cl-refactor
Gav Wood 11 years ago
parent
commit
05d99adb9c
  1. 4
      libethereum/RLP.cpp

4
libethereum/RLP.cpp

@ -94,6 +94,8 @@ eth::uint RLP::actualSize() const
bool RLP::isInt() const bool RLP::isInt() const
{ {
if (isNull())
return false;
byte n = m_data[0]; byte n = m_data[0];
if (n < c_rlpDataImmLenStart) if (n < c_rlpDataImmLenStart)
return !!n; return !!n;
@ -110,6 +112,8 @@ bool RLP::isInt() const
eth::uint RLP::length() const eth::uint RLP::length() const
{ {
if (isNull())
return 0;
uint ret = 0; uint ret = 0;
byte n = m_data[0]; byte n = m_data[0];
if (n < c_rlpDataImmLenStart) if (n < c_rlpDataImmLenStart)

Loading…
Cancel
Save