summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-06-03 23:00:42 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-06-03 23:00:42 +0100
commit0e38fe1c677b0abaac8993fac9cf6a30d6cd1b38 (patch)
tree8e92fd0be3fdca7f3926507fe9c2893a834232f6
parent3914c8e5b2181dd2ca5c1d3212f26268f508d6e9 (diff)
[boilerplate] Read big-endian images from any2ppm
-rw-r--r--boilerplate/cairo-boilerplate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c
index 13b14eb9a..fb96bee55 100644
--- a/boilerplate/cairo-boilerplate.c
+++ b/boilerplate/cairo-boilerplate.c
@@ -857,6 +857,8 @@ cairo_boilerplate_image_surface_create_from_ppm_stream (FILE *file)
for (x = 0; x < width; x++) {
if (! freadn (buf, 3, file))
goto FAIL;
+ *(uint32_t *) buf =
+ (buf[0] << 16) | (buf[1] << 8) | (buf[2] << 0);
buf += 4;
}
break;