From 904d254fc9c693eeca419d5571dc58aa7a8f25e8 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sun, 19 Nov 2023 16:03:55 -0800 Subject: [PATCH] Fix macro_set index out of range bug --- code/modules/keybindings/setup.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/keybindings/setup.dm b/code/modules/keybindings/setup.dm index 703649808f70..9ba1b783a11d 100644 --- a/code/modules/keybindings/setup.dm +++ b/code/modules/keybindings/setup.dm @@ -15,7 +15,7 @@ for(var/k in 1 to length(macro_set)) var/list/split_name = splittext(macro_set[k], ".") - if(findtext(split_name[2], "srvkeybinds-") == 1) + if((length(split_name) >= 2) && (findtext(split_name[2], "srvkeybinds-") == 1)) var/macro_name = "[split_name[1]].[split_name[2]]" // [3] is "command" erase_output = "[erase_output];[macro_name].parent=null" winset(src, null, erase_output)