summaryrefslogtreecommitdiff
path: root/src/renderer/tr_image.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-10-03 12:31:59 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:03 +0000
commit304d4258d3a49488f570b8ad71931faa7e5d40ba (patch)
treebf9ec15bd9154305ff9fab2943b3daf25024f8a5 /src/renderer/tr_image.c
parent6e90e4e7861f5cb354487d1fe0f1fd06c385308e (diff)
* Merge ioq3-r1498, by popular demand
Diffstat (limited to 'src/renderer/tr_image.c')
-rw-r--r--src/renderer/tr_image.c14
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