Skip to content

Commit

Permalink
fixed max index for GetRandomInt
Browse files Browse the repository at this point in the history
  • Loading branch information
kgns committed Oct 31, 2021
1 parent acdee87 commit d7e1c2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/weapons/helpers.sp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int GetRandomSkin(int client, int index)

int GetRandomKnife()
{
return g_iKnifeIndices[GetRandomInt(0, sizeof(g_iKnifeIndices))];
return g_iKnifeIndices[GetRandomInt(0, sizeof(g_iKnifeIndices) - 1)];
}

bool IsValidClient(int client)
Expand Down

0 comments on commit d7e1c2a

Please sign in to comment.