This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 67d4700657f60b7cd042fa39d3f866c4879b372d
Author: MAN-AT-ARMS <m4n4t4...@gmail.com>
Date:   Mon Jul 13 13:09:14 2015 -0400

    All: Fix alloc size for default skin and single shader skin
---
 MP/code/rend2/tr_image.c    | 4 ++--
 MP/code/renderer/tr_image.c | 4 ++--
 SP/code/cgame/cg_event.c    | 1 +
 SP/code/rend2/tr_image.c    | 4 ++--
 SP/code/renderer/tr_image.c | 4 ++--
 5 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/MP/code/rend2/tr_image.c b/MP/code/rend2/tr_image.c
index d051c9e..b6644ce 100644
--- a/MP/code/rend2/tr_image.c
+++ b/MP/code/rend2/tr_image.c
@@ -3383,7 +3383,7 @@ qhandle_t RE_RegisterSkin( const char *name ) {
                skin->numSurfaces   = 0;
                skin->numModels     = 0;    //----(SA) added
                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;
        }
@@ -3496,7 +3496,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;
 }
 
diff --git a/MP/code/renderer/tr_image.c b/MP/code/renderer/tr_image.c
index 569e2fa..5c2e738 100644
--- a/MP/code/renderer/tr_image.c
+++ b/MP/code/renderer/tr_image.c
@@ -1933,7 +1933,7 @@ qhandle_t RE_RegisterSkin( const char *name ) {
                skin->numSurfaces   = 0;
                skin->numModels     = 0;    //----(SA) added
                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;
        }
@@ -2046,7 +2046,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;
 }
 
diff --git a/SP/code/cgame/cg_event.c b/SP/code/cgame/cg_event.c
index f1973f8..e6bdd4d 100644
--- a/SP/code/cgame/cg_event.c
+++ b/SP/code/cgame/cg_event.c
@@ -556,6 +556,7 @@ int CG_WaterLevel(centity_t *cent) {
                viewheight = DEFAULT_VIEWHEIGHT;
        }
 
+       //
        // get waterlevel, accounting for ducking
        //
        waterlevel = 0;
diff --git a/SP/code/rend2/tr_image.c b/SP/code/rend2/tr_image.c
index 46484b8..33cfe02 100644
--- a/SP/code/rend2/tr_image.c
+++ b/SP/code/rend2/tr_image.c
@@ -3400,7 +3400,7 @@ qhandle_t RE_RegisterSkin( const char *name ) {
                skin->numSurfaces   = 0;
                skin->numModels     = 0;    //----(SA) added
                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;
        }
@@ -3513,7 +3513,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;
 }
 
diff --git a/SP/code/renderer/tr_image.c b/SP/code/renderer/tr_image.c
index 707c688..48bbc55 100644
--- a/SP/code/renderer/tr_image.c
+++ b/SP/code/renderer/tr_image.c
@@ -2004,7 +2004,7 @@ qhandle_t RE_RegisterSkin( const char *name ) {
                skin->numSurfaces   = 0;
                skin->numModels     = 0;    //----(SA) added
                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;
        }
@@ -2117,7 +2117,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;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to