]> git.saurik.com Git - uikittools.git/commitdiff
Use b flag to fopen() files for binary.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 8 Oct 2011 19:38:05 +0000 (12:38 -0700)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 8 Oct 2011 19:38:05 +0000 (12:38 -0700)
iomfsetgamma.c

index 71159d584662a4300bc6a2a170f6b46f44e20198..6dbc2e72aa7046f8f8dbfc386c4032e6a4616abe 100644 (file)
@@ -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);
     }