Skip to content

Commit c2fc3ff

Browse files
committed
Removed assertion and added column count check before swapping.
1 parent 53e0ad6 commit c2fc3ff

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,8 @@ void ReplayMenuInit( WindowLayout *layout, void *userData )
390390
#if ENABLE_GUI_HACKS
391391
// TheSuperHackers @tweak Caball009 07/02/2025 Switch the column width for the time / date with the column width for the version.
392392
ListboxData* list = static_cast<ListboxData*>(listboxReplayFiles->winGetUserData());
393-
DEBUG_ASSERTCRASH(list && list->columns >= 3 && list->columnWidth[1] < list->columnWidth[2],
394-
("Original replay window is expected to have at least 3 columns, and the second column width smaller than the third"));
395393

396-
if (list->columnWidth[1] < list->columnWidth[2])
394+
if (list->columns == 4 && list->columnWidth[1] < list->columnWidth[2])
397395
std::swap(list->columnWidth[1], list->columnWidth[2]);
398396
#endif
399397

0 commit comments

Comments
 (0)