diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-11-19 07:34:33 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-11-20 16:17:19 -0800 |
commit | 08bded98e1e3dc9580e9e19332ca228b320b659a (patch) | |
tree | 8bc7790fef5122402eadbe2d9352182cb1dfd0cf /lib.c | |
parent | eb483eb39fa4570d1178a3f71fb65be908fd0d01 (diff) | |
download | txr-08bded98e1e3dc9580e9e19332ca228b320b659a.tar.gz txr-08bded98e1e3dc9580e9e19332ca228b320b659a.tar.bz2 txr-08bded98e1e3dc9580e9e19332ca228b320b659a.zip |
Fix type hole in equal function w.r.t. COBJ.
* lib.c (equal): We cannot pass both arguments to the
left object's equal function just because both arguments are
COBJ. We must make sure they are using the same operations.
The equal functions blindly assume that both arguments are
objects of the same type, and cast the pointers.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2169,7 +2169,7 @@ val equal(val left, val right) return t; return nil; case COBJ: - if (type(right) == COBJ) + if (type(right) == COBJ && left->co.ops == right->co.ops) return left->co.ops->equal(left, right); return nil; } |