-rw-r--r-- | libopie2/opienet/opcap.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp index 8ec4f47..8184f21 100644 --- a/libopie2/opienet/opcap.cpp +++ b/libopie2/opienet/opcap.cpp @@ -145,15 +145,13 @@ QString OPacket::_dumpStructure( QObjectList* l ) const QString OPacket::dump( int bpl ) const { static int index = 0; index++; int len = _hdr.caplen; - QString str; - str.sprintf( "\n<----- Packet #%04d Len = 0x%X (%d) ----->\n\n", index, len, len ); - str.append( "0000: " ); + QString str( "000:" ); QString tmp; QString bytes; QString chars; for ( int i = 0; i < len; ++i ) { @@ -164,13 +162,13 @@ QString OPacket::dump( int bpl ) const if ( !((i+1) % bpl) ) { str.append( bytes ); str.append( ' ' ); str.append( chars ); str.append( '\n' ); - tmp.sprintf( "%04X: ", i+1 ); str.append( tmp ); + tmp.sprintf( "%03X:", i+1 ); str.append( tmp ); bytes = ""; chars = ""; } } if ( (len % bpl) ) |