From 600531ec981c5c1468f3cf06510289590b6544fe Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Sat, 23 Jun 2012 01:50:29 +0200 Subject: [PATCH] Don't use long for DDS magic number It's a DWORD (i.e. 32bit int) according to spec, so using long is actually wrong when sizeof(long) == 8. --- neo/renderer/Image_load.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neo/renderer/Image_load.cpp b/neo/renderer/Image_load.cpp index c278b7fe..408f11a5 100644 --- a/neo/renderer/Image_load.cpp +++ b/neo/renderer/Image_load.cpp @@ -1400,7 +1400,7 @@ bool idImage::CheckPrecompressedImage( bool fullLoad ) { fileSystem->CloseFile( f ); - unsigned long magic = LittleLong( *(unsigned long *)data ); + unsigned int magic = LittleLong( *(unsigned int *)data ); ddsFileHeader_t *_header = (ddsFileHeader_t *)(data + 4); int ddspf_dwFlags = LittleLong( _header->ddspf.dwFlags );