diff options
Diffstat (limited to 'src/renderer/tr_image.c')
-rw-r--r-- | src/renderer/tr_image.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/renderer/tr_image.c b/src/renderer/tr_image.c index 836433b5..5ed98450 100644 --- a/src/renderer/tr_image.c +++ b/src/renderer/tr_image.c @@ -1432,7 +1432,11 @@ qhandle_t RE_RegisterSkin( const char *name ) { qhandle_t hSkin; skin_t *skin; skinSurface_t *surf; - char *text, *text_p; + union { + char *c; + void *v; + } text; + char *text_p; char *token; char surfName[MAX_QPATH]; @@ -1481,12 +1485,12 @@ qhandle_t RE_RegisterSkin( const char *name ) { } // load and parse the skin file - ri.FS_ReadFile( name, (void **)&text ); - if ( !text ) { + ri.FS_ReadFile( name, &text.v ); + if ( !text.c ) { return 0; } - text_p = text; + text_p = text.c; while ( text_p && *text_p ) { // get surface name token = CommaParse( &text_p ); @@ -1515,7 +1519,7 @@ qhandle_t RE_RegisterSkin( const char *name ) { skin->numSurfaces++; } - ri.FS_FreeFile( text ); + ri.FS_FreeFile( text.v ); // never let a skin have 0 shaders |