From 829e0280c3c29ef5fd9a3db4077fd15faf0ca0de Mon Sep 17 00:00:00 2001 From: "vageyenaman@gmail.com" Date: Sun, 8 Apr 2012 18:35:25 +0000 Subject: [PATCH] Whoops. Forgot to include a file in my previous commit. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3414 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/scripting/Implementations/_Logic.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/scripting/Implementations/_Logic.dm b/code/modules/scripting/Implementations/_Logic.dm index ff17bae2860..bb87dc9af33 100644 --- a/code/modules/scripting/Implementations/_Logic.dm +++ b/code/modules/scripting/Implementations/_Logic.dm @@ -166,7 +166,7 @@ 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)) + if(istext(string) && istext(separator)) return dd_text2list(string, separator) proc/n_repeat(var/string, var/amount) @@ -174,6 +174,8 @@ proc/n_repeat(var/string, var/amount) var/i var/newstring = "" for(i=0, i<=amount, i++) + if(i>=1000) + break newstring = newstring + string return newstring @@ -183,6 +185,8 @@ proc/n_reverse(var/string) var/newstring = "" var/i for(i=lentext(string), i>0, i--) + if(i>=1000) + break newstring = newstring + copytext(string, i, i+1) return newstring