aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre BACQUART <tek512@gmail.com>2016-06-17 11:30:32 -0600
committerTony Barbour <tony@LunarG.com>2016-06-17 11:31:50 -0600
commit9063e2ab9c0c32e25aab2c46af38302a4ac2c98e (patch)
treee45563f706812b3591e4f9e413441ef3174f8750
parent8239cdbd1ef76e82435dcec27a19202292d2dd9d (diff)
downloadusermoji-9063e2ab9c0c32e25aab2c46af38302a4ac2c98e.tar.xz
demos: fix ppm loader swapped width & height
Change-Id: I277fe91a928223a09f672d07c22a1547e710b847
-rw-r--r--demos/cube.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/demos/cube.c b/demos/cube.c
index 9b12bfcb..d5269bc8 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;