Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix warning: array subscript is above array bounds.

  • Loading branch information...
commit 601bf2ddbde219989338e228a363448eee865da9 1 parent 7cae5f7
@bnoordhuis bnoordhuis authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 l_bsp_hl.c
View
11 l_bsp_hl.c
@@ -331,7 +331,7 @@ Byte swaps all data in a bsp file.
*/
void HL_SwapBSPFile (qboolean todisk)
{
- int i, j, c;
+ int i, j, k, c;
hl_dmodel_t *d;
hl_dmiptexlump_t *mtl;
@@ -381,8 +381,13 @@ void HL_SwapBSPFile (qboolean todisk)
//
for (i=0 ; i<hl_numtexinfo ; i++)
{
- for (j=0 ; j<8 ; j++)
- hl_texinfo[i].vecs[0][j] = LittleFloat (hl_texinfo[i].vecs[0][j]);
+ for (j=0 ; j<2 ; j++)
+ {
+ for (k=0; k<4; k++)
+ {
+ hl_texinfo[i].vecs[j][k] = LittleFloat (hl_texinfo[i].vecs[j][k]);
+ }
+ }
hl_texinfo[i].miptex = LittleLong (hl_texinfo[i].miptex);
hl_texinfo[i].flags = LittleLong (hl_texinfo[i].flags);
}
Please sign in to comment.
Something went wrong with that request. Please try again.