engine: fix some possible off by one errors

This commit is contained in:
Alibek Omarov
2024-11-17 13:04:20 +03:00
parent 8f7f311f60
commit 229f1560b0
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -2791,7 +2791,7 @@ static void Mod_LoadTexInfo( model_t *mod, dbspmodel_t *bmod )
out->vecs[j][k] = in->vecs[j][k];
miptex = in->miptex;
if( miptex < 0 || miptex > mod->numtextures )
if( miptex < 0 || miptex >= mod->numtextures )
miptex = 0; // this is possible?
out->texture = mod->textures[miptex];
out->flags = in->flags;