From 236ff29c133d893433f7392f2f62b2eec974fe2b Mon Sep 17 00:00:00 2001 From: shermp <14854761+shermp@users.noreply.github.com> Date: Tue, 11 Jun 2019 23:41:53 +1200 Subject: [PATCH] Opening vhd in binary mode might help... --- src/minivhd_manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/minivhd_manage.c b/src/minivhd_manage.c index 6d28118..3e0d9da 100644 --- a/src/minivhd_manage.c +++ b/src/minivhd_manage.c @@ -164,7 +164,7 @@ MVHDMeta* mvhd_open(const char* path, bool readonly, int* err) { *err = MVHD_ERR_MEM; goto end; } - vhdm->f = readonly ? fopen64(path, "r") : fopen64(path, "r+"); + vhdm->f = readonly ? fopen64(path, "rb") : fopen64(path, "rb+"); if (vhdm->f == NULL) { *err = MVHD_ERR_FILE; goto cleanup_vhdm;