From 94ff25e8a4e36a7dc40628256fd824950a1e140b Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 8 Nov 2007 08:55:03 +0000 Subject: [PATCH] Open the dump files in binary mode. --- suunto_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/suunto_test.c b/suunto_test.c index 70e8fbd..3d133ad 100644 --- a/suunto_test.c +++ b/suunto_test.c @@ -67,7 +67,7 @@ int test_dump_sdm16 (const char* name, const char* filename) } while (rc > 0); printf ("Dumping data\n"); - FILE *fp = fopen (filename, "w"); + FILE *fp = fopen (filename, "wb"); if (fp != NULL) { fwrite (data, sizeof (unsigned char), sizeof (data), fp); fclose (fp); @@ -112,7 +112,7 @@ int test_dump_memory (const char* name, const char* filename) } printf ("Dumping data\n"); - FILE* fp = fopen (filename, "w"); + FILE* fp = fopen (filename, "wb"); if (fp != NULL) { fwrite (data, sizeof (unsigned char), sizeof (data), fp); fclose (fp);