Skip to content

Commit

Permalink
Fix macro_set index out of range bug (#4972)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zonespace27 authored Nov 22, 2023
1 parent d644b6f commit b3d63e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/keybindings/setup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b3d63e0

Please sign in to comment.