- Quick fix for the explode() proc in NTSL not accepting a null separator.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5798 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2013-03-02 00:30:49 +00:00
parent 9bbb8dd202
commit 6bf905a26a

View File

@@ -175,8 +175,10 @@ proc/string_explode(var/string, var/separator)
Just found out there was already a string explode function, did some benchmarking, and that function were a bit faster, sticking to that.
*/
proc/string_explode(var/string, var/separator)
if(istext(string) && istext(separator))
proc/string_explode(var/string, var/separator = "")
if(istext(string) && (istext(separator) || isnull(separator)))
return text2list(string, separator)
proc/n_repeat(var/string, var/amount)