Commit 8eb1a29a authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Print data offset additionally to prefix while dumping data.

parent d5e1804c
...@@ -57,7 +57,7 @@ void dump_data( const unsigned char *ptr, unsigned int size, const char *prefix ...@@ -57,7 +57,7 @@ void dump_data( const unsigned char *ptr, unsigned int size, const char *prefix
{ {
unsigned int i, j; unsigned int i, j;
printf( "%s", prefix ); printf( "%s%08x: ", prefix, 0 );
if (!ptr) if (!ptr)
{ {
printf("NULL\n"); printf("NULL\n");
...@@ -71,7 +71,7 @@ void dump_data( const unsigned char *ptr, unsigned int size, const char *prefix ...@@ -71,7 +71,7 @@ void dump_data( const unsigned char *ptr, unsigned int size, const char *prefix
printf( " " ); printf( " " );
for (j = 0; j < 16; j++) for (j = 0; j < 16; j++)
printf( "%c", isprint(ptr[i-15+j]) ? ptr[i-15+j] : '.' ); printf( "%c", isprint(ptr[i-15+j]) ? ptr[i-15+j] : '.' );
if (i < size-1) printf( "\n%s", prefix ); if (i < size-1) printf( "\n%s%08x: ", prefix, i + 1 );
} }
} }
if (i % 16) if (i % 16)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment