diff --git a/code/modules/scripting/Implementations/_Logic.dm b/code/modules/scripting/Implementations/_Logic.dm index f954cf0341a..a76f4006e11 100644 --- a/code/modules/scripting/Implementations/_Logic.dm +++ b/code/modules/scripting/Implementations/_Logic.dm @@ -101,13 +101,13 @@ if(haystack && needle) if(isobject(haystack)) if(istype(haystack, /list)) - if(length(haystack) >= end && start > 0) + if(length(haystack) + 1 >= end && start > 0) var/list/listhaystack = haystack return listhaystack.Find(needle, start, end) else if(istext(haystack)) - if(length(haystack) >= end && start > 0) + if(length(haystack) + 1 >= end && start > 0) return findtext(haystack, needle, start, end) // Clone of copytext()