Color profile reading is broken on windows. b=492962 r=joe
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Fri, 15 May 2009 18:07:34 -0400
changeset 28393 0ed7321fdebd106708a963395cae8124f348cf57
parent 28392 1141d12a50b514d9c1bc7bf2219ff78e084fd554
child 28394 0f8895e7620ab53a652326cc40d586aa710c90a7
push idunknown
push userunknown
push dateunknown
reviewersjoe
bugs492962
milestone1.9.2a1pre
Color profile reading is broken on windows. b=492962 r=joe The fix is to properly fopen() with "rb" instead of just "r", so that windows knows to treat it as a binary
gfx/qcms/iccread.c
--- a/gfx/qcms/iccread.c
+++ b/gfx/qcms/iccread.c
@@ -771,15 +771,15 @@ qcms_profile* qcms_profile_from_file(FIL
 	profile = qcms_profile_from_memory(data, length);
 	free(data);
 	return profile;
 }
 
 qcms_profile* qcms_profile_from_path(const char *path)
 {
 	qcms_profile *profile = NULL;
-	FILE *file = fopen(path, "r");
+	FILE *file = fopen(path, "rb");
 	if (file) {
 		profile = qcms_profile_from_file(file);
 		fclose(file);
 	}
 	return profile;
 }