Branch: Tag:

2017-04-02

2017-04-02 20:36:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

search: Fixed end of range condition.

Fixes testsuite failure.

951:    *!    *! @param end    *! If the optional argument @[end] is present, the search will terminate -  *! at this position if not found earlier. +  *! at this position (exclusive) if not found earlier.    *!    *! @returns    *! Returns the position of @[needle] in @[haystack] if found.
1091:    start = string_search(haystack,    Pike_sp[1-args].u.string,    start); +  end -= Pike_sp[1-args].u.string->len-1;    }    } else {    SIMPLE_ARG_TYPE_ERROR("search", 2, "string | int");