summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderergl2/tr_image.c')
-rw-r--r--src/renderergl2/tr_image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/renderergl2/tr_image.c b/src/renderergl2/tr_image.c
index 08894a4a..ef244d56 100644
--- a/src/renderergl2/tr_image.c
+++ b/src/renderergl2/tr_image.c
@@ -3121,7 +3121,7 @@ qhandle_t RE_RegisterSkin( const char *name ) {
// If not a .skin file, load as a single shader
if ( strcmp( name + strlen( name ) - 5, ".skin" ) ) {
skin->numSurfaces = 1;
- skin->surfaces[0] = ri.Hunk_Alloc( sizeof(skin->surfaces[0]), h_low );
+ skin->surfaces[0] = ri.Hunk_Alloc( sizeof( *skin->surfaces[0] ), h_low );
skin->surfaces[0]->shader = R_FindShader( name, LIGHTMAP_NONE, qtrue );
return hSkin;
}
@@ -3192,7 +3192,7 @@ void R_InitSkins( void ) {
skin = tr.skins[0] = ri.Hunk_Alloc( sizeof( skin_t ), h_low );
Q_strncpyz( skin->name, "<default skin>", sizeof( skin->name ) );
skin->numSurfaces = 1;
- skin->surfaces[0] = ri.Hunk_Alloc( sizeof( *skin->surfaces ), h_low );
+ skin->surfaces[0] = ri.Hunk_Alloc( sizeof( *skin->surfaces[0] ), h_low );
skin->surfaces[0]->shader = tr.defaultShader;
}