Skip to content

Commit

Permalink
Add O_BINARY option to open file. (#753)
Browse files Browse the repository at this point in the history
See issue #752.
  • Loading branch information
JiriBilek authored and xor-gate committed Dec 21, 2018
1 parent 0a2b7a4 commit 358a913
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ int stlink_fread(stlink_t* sl, const char* path, bool is_ihex, stm32_addr_t addr

int error;

int fd = open(path, O_RDWR | O_TRUNC | O_CREAT, 00700);
int fd = open(path, O_RDWR | O_TRUNC | O_CREAT | O_BINARY, 00700);
if (fd == -1) {
fprintf(stderr, "open(%s) == -1\n", path);
return -1;
Expand Down

0 comments on commit 358a913

Please sign in to comment.