alliedmodders / amxmodx

AMX Mod X - Half-Life 1 Scripting and Administration
http://www.amxmodx.org/
496 stars 200 forks source link

Fix for loop index out of bounds error #966

Closed fysiks1 closed 3 years ago

fysiks1 commented 3 years ago

Fixes an index out of bounds error when refreshMenus() and subsequently findAdminsWithMenu() is called when there is 32 players in the server. Indexing the playersList array in the for loop condition causes it to try to index with a value of 32 on the very last condition check which is not valid for this array.

fysiks1 commented 3 years ago

I imagine that this could be eligible for 1.9-dev.

Arkshine commented 3 years ago

Thanks!

fysiks1 commented 3 years ago

Any chance this can be applied to 1.9-dev since it's a bug fix?

dvander commented 3 years ago

Sure, just submit a PR against the 1.9 branch.

WPMGPRoSToTeMa commented 3 years ago

Sure, just submit a PR against the 1.9 branch.

Note that it was already cherry-picked into 1.9-dev. 8e902cb