Skip to content

Commit 7406196

Browse files
j-mattssonslipher
authored andcommitted
Fix potential index out of bounds in Material.cpp
1 parent bf8fe39 commit 7406196

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/engine/renderer/Material.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,7 @@ void MaterialSystem::AddDrawCommand( const uint32_t materialID, const uint32_t m
19501950
}
19511951

19521952
void MaterialSystem::AddTexture( Texture* texture ) {
1953-
if ( cmd.textureCount > MAX_DRAWCOMMAND_TEXTURES ) {
1953+
if ( cmd.textureCount >= MAX_DRAWCOMMAND_TEXTURES ) {
19541954
Sys::Drop( "Exceeded max DrawCommand textures" );
19551955
}
19561956
cmd.textures[cmd.textureCount] = texture;

0 commit comments

Comments
 (0)