diff --git a/sys/src/libaml/aml.c b/sys/src/libaml/aml.c index 9f030462f..8549740e3 100644 --- a/sys/src/libaml/aml.c +++ b/sys/src/libaml/aml.c @@ -1524,7 +1524,7 @@ cmp1(void *a, void *b) tag = TAG(a); if(b == nil || TAG(b) != tag) b = copy(tag, b); - if(TAG(b) != tag) + if(b == nil || TAG(b) != tag) return -1; /* botch */ switch(tag){ default: