Skip to content

Commit 2d1d5f6

Browse files
committed
Fixed issue #4, writing binary file correctly
1 parent d8d77f8 commit 2d1d5f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/hex2bin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int hex2bin_file_addr(const char* hex_fn, const char* bin_fn, int address) {
7272
printf("Error opening %s for reading\n", hex_fn);
7373
return -1;
7474
}
75-
ofp = fopen(bin_fn, "w");
75+
ofp = fopen(bin_fn, "wb");
7676
if (ofp == NULL) {
7777
printf("Error opening %s for writing\n", bin_fn);
7878
return - 1;

0 commit comments

Comments
 (0)