aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dump.c2
-rw-r--r--system.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/dump.c b/dump.c
index 182a2b6..3e651b1 100644
--- a/dump.c
+++ b/dump.c
@@ -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;
}
diff --git a/system.c b/system.c
index 39f40cc..0894f20 100644
--- a/system.c
+++ b/system.c
@@ -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;
}