summaryrefslogtreecommitdiff
path: root/src/renderer/tr_image_png.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer/tr_image_png.c')
-rw-r--r--src/renderer/tr_image_png.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/renderer/tr_image_png.c b/src/renderer/tr_image_png.c
index e33ffffa..ef44c165 100644
--- a/src/renderer/tr_image_png.c
+++ b/src/renderer/tr_image_png.c
@@ -215,6 +215,10 @@ struct BufferedFile
static struct BufferedFile *ReadBufferedFile(const char *name)
{
struct BufferedFile *BF;
+ union {
+ byte *b;
+ void *v;
+ } buffer;
/*
* input verification
@@ -248,7 +252,8 @@ static struct BufferedFile *ReadBufferedFile(const char *name)
* Read the file.
*/
- BF->Length = ri.FS_ReadFile((char *) name, (void **) &BF->Buffer);
+ BF->Length = ri.FS_ReadFile((char *) name, &buffer.v);
+ BF->Buffer = buffer.b;
/*
* Did we get it? Is it big enough?