mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Prevent illegal array access (#159)
When using mousewheel to switch between pages in features screen, the HandleHighLightedText() function sometimes would retain valid bHighlight index, but toggle_box_array[bHighlight] == -1, which is used to access z113FeaturesToggleText[] and would later trigger Assertion in gprintfdirty() with pFontString == NULL
This commit is contained in:
+1
-1
@@ -1517,7 +1517,7 @@ void HandleHighLightedText(BOOLEAN fHighLight)
|
||||
bLastRegion = -1;
|
||||
}
|
||||
|
||||
if (bHighLight != -1)
|
||||
if (bHighLight != -1 && toggle_box_array[bHighLight] != -1)
|
||||
{
|
||||
if (bHighLight < OPT_FIRST_COLUMN_TOGGLE_CUT_OFF)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user