Infinite loop fix for splitting on null

This commit is contained in:
Uristqwerty
2012-07-07 23:16:40 -04:00
parent c1711f41ee
commit c968343d6f
+3
View File
@@ -1753,6 +1753,9 @@ proc/oview_or_orange(distance = world.view , center = usr , type)
return
/proc/stringsplit(txt, character)
if(length(character) < 1) //Do not infinite loop when splitting on "" or null
return list(txt)
var/cur_text = txt
var/last_found = 1
var/found_char = findtext(cur_text,character)