[Ecls-list] amusing bug in equal

Brian Spilsbury brian.spilsbury at gmail.com
Fri May 4 02:40:47 UTC 2007


In the latest cvs checkout (equal #\( nil) -> T, (equal nil #\() -> Nil.

It appears that equal is only dispatching on the type of the first operand, and
in the case of character comparison, then doing an unguarded CHAR_CODE
operation.

in predicate.d, ecl_equal:

        case t_character:
                return CHARACTERP(y) && (CHAR_CODE(x) == CHAR_CODE(y));

should fix the problem.

Regards,
Brian.




More information about the ecl-devel mailing list