Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
Coorect texture unit comparison, remove <vector> include
  • Loading branch information
VReaperV committed May 11, 2024
1 parent d1a0be0 commit 4799d1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/engine/renderer/tr_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void GL_SelectTexture( int unit )
return;
}

if ( unit >= 0 && unit <= glConfig2.maxTextureUnits )
if ( unit >= 0 && unit < glConfig2.maxTextureUnits )
{
glActiveTexture( GL_TEXTURE0 + unit );

Expand All @@ -175,7 +175,7 @@ void GL_BindToTMU( int unit, image_t *image )

int texnum = image->texnum;

if ( unit < 0 || unit > glConfig2.maxTextureUnits )
if ( unit < 0 || unit >= glConfig2.maxTextureUnits )
{
Sys::Drop( "GL_BindToTMU: unit %i is out of range\n", unit );
}
Expand Down
2 changes: 0 additions & 2 deletions src/engine/renderer/tr_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef TR_LOCAL_H
#define TR_LOCAL_H

#include <vector>

#include "common/FileSystem.h"
#include "qcommon/q_shared.h"
#include "qcommon/qfiles.h"
Expand Down

0 comments on commit 4799d1f

Please sign in to comment.