Fixed crash (getUInt takes m_current_offset into account, which made
the indices partially invalid).
This commit is contained in:
parent
8621437e07
commit
5c32cbe1be
@ -130,15 +130,15 @@ std::string BareNetworkString::getLogMessage() const
|
||||
unsigned int upper_limit = std::min(line+16, size());
|
||||
for(unsigned int i=line; i<upper_limit; i++)
|
||||
{
|
||||
oss << getUInt8(i);
|
||||
oss << m_buffer[i];
|
||||
if(i%2==1) oss << " ";
|
||||
} // for i
|
||||
// Add ascii representation
|
||||
for(unsigned int i=line; i<upper_limit; i++)
|
||||
{
|
||||
uint8_t c = getUInt8(i);
|
||||
uint8_t c = m_buffer[i];
|
||||
if(isprint(c))
|
||||
oss << char(getUInt8(i));
|
||||
oss << char(c);
|
||||
else
|
||||
oss << '.';
|
||||
} // for i
|
||||
|
Loading…
Reference in New Issue
Block a user