From 9063e2ab9c0c32e25aab2c46af38302a4ac2c98e Mon Sep 17 00:00:00 2001 From: Alexandre BACQUART Date: Fri, 17 Jun 2016 11:30:32 -0600 Subject: [PATCH] demos: fix ppm loader swapped width & height Change-Id: I277fe91a928223a09f672d07c22a1547e710b847 --- demos/cube.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/cube.c b/demos/cube.c index 9b12bfc..d5269bc 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -1032,7 +1032,7 @@ bool loadTexture(const char *filename, uint8_t *rgba_data, return false; } while(strncmp(cPtr++, "\n", 1)); - sscanf(cPtr, "%u %u", height, width); + sscanf(cPtr, "%u %u", width, height); if (rgba_data == NULL) { return true; } @@ -1075,7 +1075,7 @@ bool loadTexture(const char *filename, uint8_t *rgba_data, } } while (!strncmp(header, "#", 1)); - sscanf(header, "%u %u", height, width); + sscanf(header, "%u %u", width, height); if (rgba_data == NULL) { fclose(fPtr); return true; -- 2.7.4