Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

GameScript::SetMusic: avoid out-of-bounds write

coverity 4420
  • Loading branch information...
commit 948cfe18793994e51124e45d6f45c015ffc66cc7 1 parent b643f53
@lynxlynxlynx lynxlynxlynx authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  gemrb/core/GameScript/Actions.cpp
View
2  gemrb/core/GameScript/Actions.cpp
@@ -1867,7 +1867,7 @@ void GameScript::StartCombatCounter(Scriptable* Sender, Action* /*parameters*/)
void GameScript::SetMusic(Scriptable* Sender, Action* parameters)
{
//iwd2 allows setting all 10 slots, though, there is no evidence they are used
- if (parameters->int0Parameter>10) return;
+ if (parameters->int0Parameter >= 10) return;
Map *map = Sender->GetCurrentArea();
if (!map) return;
map->SongHeader.SongList[parameters->int0Parameter]=parameters->int1Parameter;
Please sign in to comment.
Something went wrong with that request. Please try again.