mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Fixes a dd_replacetext() sanity checks so that "" isn't considered an invalid text to substitute into a string.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3336 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -218,7 +218,7 @@
|
||||
return max(low,min(high,num))
|
||||
|
||||
/proc/dd_replacetext(text, search_string, replacement_string)
|
||||
if(!text || !search_string || !replacement_string)
|
||||
if(!text || !istext(text) || !search_string || !istext(search_string) || !istext(replacement_string))
|
||||
return null
|
||||
var/textList = dd_text2list(text, search_string)
|
||||
return dd_list2text(textList, replacement_string)
|
||||
|
||||
Reference in New Issue
Block a user