larcenists / larceny

Larceny Scheme implementation
Other
204 stars 33 forks source link

bug in SRFI 114 hash functions #714

Closed WillClinger closed 9 years ago

WillClinger commented 9 years ago
> (import (srfi 114))

> (comparator-hash string-comparator "")

Error: unhandled condition:
Compound condition has these components: 
#<record &assertion>
#<record &who>
    who : "string-ref"
#<record &message>
    message : "string-ref: illegal second argument: -1  is not a valid index into string\n"

The bug is in make-vectorwise-hash, which is defined in lib/SRFI/srfi/114.constructors.scm. The (= index 0) should be (<= index 0).

WillClinger commented 9 years ago

Fixed by changeset a4066b61c92bff314b771f2870696e7585bf0b80