From a1c9d67a61aa4fe365025f138a076b8ffa322c0c Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 8 Oct 2011 12:38:05 -0700 Subject: Use b flag to fopen() files for binary. --- iomfsetgamma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iomfsetgamma.c b/iomfsetgamma.c index 71159d5..6dbc2e7 100644 --- a/iomfsetgamma.c +++ b/iomfsetgamma.c @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) { uint32_t data[0xc00 / sizeof(uint32_t)]; memset(data, 0, sizeof(data)); - FILE *file = fopen("/tmp/.iomfgamma.dat", "r"); + FILE *file = fopen("/tmp/.iomfgamma.dat", "rb"); if (file == NULL) { $IOMobileFramebufferGetGammaTable = dlsym(RTLD_DEFAULT, "IOMobileFramebufferGetGammaTable"); _assert($IOMobileFramebufferGetGammaTable != NULL); @@ -86,7 +86,7 @@ int main(int argc, char *argv[]) { fwrite(data, 1, sizeof(data), file); fclose(file); - file = fopen("/tmp/.iomfgamma.dat", "r"); + file = fopen("/tmp/.iomfgamma.dat", "rb"); _assert(file != NULL); } -- cgit v1.2.3