diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2022-02-03 09:47:50 -0500 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2022-02-03 09:47:50 -0500 |
| commit | 56814c85dff9c497892a76cb43a65380880945cf (patch) | |
| tree | 8e027df7b64657e34aad98598e24fd01e14c84ec | |
| parent | bbc3a15672ff677a569bfcd0597cc385ccdb4d59 (diff) | |
| download | weekly-56814c85dff9c497892a76cb43a65380880945cf.tar.gz | |
Open with binary mode so Windows can seek properly
| -rw-r--r-- | dump.c | 2 | ||||
| -rw-r--r-- | system.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -2,7 +2,7 @@ int dump_file(const char *filename, int style) { FILE *fp; - fp = fopen(filename, "r"); + fp = fopen(filename, "rb+"); if (!fp) { return -1; } @@ -111,7 +111,7 @@ char *find_program(const char *name) { ssize_t get_file_size(const char *filename) { ssize_t result; FILE *fp; - fp = fopen(filename, "r"); + fp = fopen(filename, "rb+"); if (!fp) { return -1; } |
