Skip to content
Snippets Groups Projects
Commit 12734e68 authored by Dominik Loidolt's avatar Dominik Loidolt
Browse files

Fix a bug when writing a binary file in windows

parent bd8783f4
Branches
Tags
1 merge request!17Fix a bug when writing a binary file in windows
......@@ -145,7 +145,7 @@ static FILE *open_file(const char *dirname, const char *filename)
abort();
}
return fopen(pathname, "w");
return fopen(pathname, "wb");
}
......@@ -1208,7 +1208,7 @@ static __inline uint8_t str_to_uint8(const char *str, char const **str_end)
* @returns the size in bytes to store the string content; negative on error
*/
static ssize_t __inline str2uint8_arr(const char *str, uint8_t *data, uint32_t buf_size,
static __inline ssize_t str2uint8_arr(const char *str, uint8_t *data, uint32_t buf_size,
const char *file_name, int verbose_en)
{
const char *nptr = str;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment