From: Jay Freeman (saurik) Date: Sat, 8 Oct 2011 19:38:05 +0000 (-0700) Subject: Use b flag to fopen() files for binary. X-Git-Tag: v1.1.1~3 X-Git-Url: https://git.saurik.com/uikittools.git/commitdiff_plain/a1c9d67a61aa4fe365025f138a076b8ffa322c0c?ds=inline Use b flag to fopen() files for binary. --- 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); }