makes the error logger actually work with less than 2 argument runtimes (#20496)

This commit is contained in:
GDN
2023-03-13 17:17:43 -05:00
committed by GitHub
parent 89a48529c1
commit 272b7010e3
+6 -5
View File
@@ -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")