From a14a7a0ccc9de76aeab0b2e4bbf58f1a79deedc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 3 Jul 2024 10:19:30 +0200 Subject: New upstream version 5.3.0GA --- app/wlib/mswlib/checksum.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'app/wlib/mswlib/checksum.c') 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; -- cgit v1.2.3