diff --git a/code/modules/error_handler/error_handler.dm b/code/modules/error_handler/error_handler.dm index 701c2d62dcd..e0615f0a46c 100644 --- a/code/modules/error_handler/error_handler.dm +++ b/code/modules/error_handler/error_handler.dm @@ -35,13 +35,14 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0) // First split on the colon var/list/inner_split = splittext(original_line, ": ") - var/source_half = "[inner_split[1]]: " - var/proc_half = inner_split[2] - var/proc_name = splittext(proc_half, "(")[1] // Put a ) here to stop the bracket colouriser whining + if(length(inner_split) >= 2) + var/source_half = "[inner_split[1]]: " + var/proc_half = inner_split[2] + var/proc_name = splittext(proc_half, "(")[1] // Put a ) here to stop the bracket colouriser whining - proc_name = replacetext(proc_name, " ", "_") // Put the underscores back because BYOND removes them for some reason + proc_name = replacetext(proc_name, " ", "_") // Put the underscores back because BYOND removes them for some reason - sanitize_splitlines[i] = "[source_half][proc_name]" + sanitize_splitlines[i] = "[source_half][proc_name]" e.desc = sanitize_splitlines.Join("\n")