bug in reference implementation of string-contains Matthias Radestock (10 Dec 2003 20:05 UTC)
Re: bug in reference implementation of string-contains Michael Sperber (09 Apr 2005 14:56 UTC)

bug in reference implementation of string-contains Matthias Radestock 10 Dec 2003 20:05 UTC

Chris Double has found the following bug in the reference implementation:

(string-contains "xabc" "ab")
; => 1 ;;good
(string-contains "aabc" "ab")
; => #f ;;bad

This behaviour has been observed on two systems using the reference
implementation - SISC and scsh.

Matthias.
PS: There is also an off-by-one error in the bounds check of the
unoptimized version of string-contains that is included as commented out
code in the reference implementation. This breaks things like
(string-contains "xab" "ab") and (string-contains "ab" "ab").