summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/util/piglit_ktx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/util/piglit_ktx.c b/tests/util/piglit_ktx.c
index 13a3d9118..4c6748963 100644
--- a/tests/util/piglit_ktx.c
+++ b/tests/util/piglit_ktx.c
@@ -325,7 +325,7 @@ piglit_ktx_parse_images(struct piglit_ktx *self)
/* Begin parsing first image. */
image = &self->images[0];
-#define CUR_SIZE ((void*) p.u8 - self->data)
+#define CUR_SIZE (p.u8 - (uint8_t *) self->data)
for (miplevel = 0; miplevel < info->num_miplevels; ++miplevel) {
uint32_t image_size;