Fixes runtimes with add_leading() and add_trailing() (#48918)

This commit is contained in:
MrPerson
2020-01-22 16:31:51 -05:00
committed by Emmett Gaines
parent 3e4af51f61
commit d3ad08caba
+2
View File
@@ -232,12 +232,14 @@
//Adds 'char' ahead of 'text' until there are 'count' characters total
/proc/add_leading(text, count, char = " ")
text = "[text]"
var/charcount = count - length_char(text)
var/list/chars_to_add[max(charcount + 1, 0)]
return jointext(chars_to_add, char) + text
//Adds 'char' behind 'text' until there are 'count' characters total
/proc/add_trailing(text, count, char = " ")
text = "[text]"
var/charcount = count - length_char(text)
var/list/chars_to_add[max(charcount + 1, 0)]
return text + jointext(chars_to_add, char)