From a20c0a0e0274aa75271ced02d0e50e0046aebb2a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 17 Oct 2020 15:21:20 +0200 Subject: [PATCH] - fixed infinite loop with list menus that have no selectable item. --- wadsrc/static/zscript/ui/menu/listmenu.zs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/ui/menu/listmenu.zs b/wadsrc/static/zscript/ui/menu/listmenu.zs index 66d209381..8010575a4 100644 --- a/wadsrc/static/zscript/ui/menu/listmenu.zs +++ b/wadsrc/static/zscript/ui/menu/listmenu.zs @@ -143,7 +143,7 @@ class ListMenu : Menu override bool MenuEvent (int mkey, bool fromcontroller) { int oldSelect = mDesc.mSelectedItem; - int startedAt = mDesc.mSelectedItem; + int startedAt = max(0, mDesc.mSelectedItem); switch (mkey) {