diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2024-11-14 19:35:45 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2024-11-14 19:35:45 +0100 |
commit | df5520aa2dae5b3ce7abf8733dcdd152898af163 (patch) | |
tree | 00d3047bfb14f682bfb5a21010c731ed649bfed7 /app/wlib/mswlib/checksum.c | |
parent | df247efec654e512242e4f4f1b0212034f9e01fe (diff) | |
parent | ec3c0f6f6e7153fa797dc57a0e95779cbc63a23b (diff) |
Merge branch 'release/debian/1_5.3.0GA-1'debian/1_5.3.0GA-1
Diffstat (limited to 'app/wlib/mswlib/checksum.c')
-rw-r--r-- | app/wlib/mswlib/checksum.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/app/wlib/mswlib/checksum.c b/app/wlib/mswlib/checksum.c index f19d15b..52d8453 100644 --- a/app/wlib/mswlib/checksum.c +++ b/app/wlib/mswlib/checksum.c @@ -20,15 +20,19 @@ int main( int argc, char *argv[] ) set = 0; fp = openfile( argv[1], "rb", &FileSize ); } - if (fp == NULL) + if (fp == NULL) { exit(1); - + } + fprintf( stderr, "File Size = %ld (%lx)\n", FileSize, FileSize ); sum16computed = mswCheck16( fp, FileSize, &sum16stored ); - if (!mswCheck32( fp, FileSize, &sum32off, &sum32computed, &sum32stored )) + if (!mswCheck32( fp, FileSize, &sum32off, &sum32computed, &sum32stored )) { fprintf( stderr, "mswCheck32 error\n" ); - fprintf( stderr, "sum16: stored = %x, computed = %x, sum = %x, expected FFFF\n", sum16stored, sum16computed, sum16stored+sum16computed ); - fprintf( stderr, "sum32: stored = %lx, computed = %lx, expected %lx\n", sum32stored, sum32computed, sum32stored ); + } + fprintf( stderr, "sum16: stored = %x, computed = %x, sum = %x, expected FFFF\n", + sum16stored, sum16computed, sum16stored+sum16computed ); + fprintf( stderr, "sum32: stored = %lx, computed = %lx, expected %lx\n", + sum32stored, sum32computed, sum32stored ); if (set) { fseek( fp, 0x12, SEEK_SET ); sum16computed = 0xFFFF - sum16computed; |