From 426117f006e3c44226533372e85f168eeefb4112 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Sat, 29 Dec 2012 20:32:59 +0100 Subject: [PATCH] filebundle: always open files as binary If files have wrong file endings the stated lenghts won't match total data read from file. --- src/filebundle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filebundle.c b/src/filebundle.c index 77e335e7..81993d03 100644 --- a/src/filebundle.c +++ b/src/filebundle.c @@ -384,7 +384,7 @@ fb_file *fb_open2 } else { char path[512]; snprintf(path, sizeof(path), "%s/%s", dir->d.root, name); - FILE *fp = fopen(path, "r"); + FILE *fp = fopen(path, "rb"); if (fp) { struct stat st; lstat(path, &st);