diff --git a/common/lset.cpp b/common/lset.cpp index e568c6fe28..af38661639 100644 --- a/common/lset.cpp +++ b/common/lset.cpp @@ -286,17 +286,20 @@ std::string LSET::FmtHex() const static const char hex[] = "0123456789abcdef"; - int nibble_count = ( size() + 3 ) / 4; + unsigned nibble_count = ( size() + 3 ) / 4; - for( int nibble=0; nibble= size() ) + break; + + if( (*this)[nibble_bit + nibble * 4] ) + ndx |= ( 1 << nibble_bit ); } if( nibble && !( nibble % 8 ) )