diff options
Diffstat (limited to 'liblali.c')
| -rw-r--r-- | liblali.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -855,13 +855,13 @@ Object *primitiveDiff(Object **args, GC_PARAM) { (first->type == TYPE_SYMBOL && second->type == TYPE_SYMBOL)) return strcmp(first->string, second->string) ? t : f; else if (first->type == TYPE_CONS && second->type == TYPE_CONS) { - for (; (first->cdr != nil || second->cdr != nil); + for (; (first->cdr->type == TYPE_CONS && second->cdr->type == TYPE_CONS); first = first->cdr, second = second->cdr) { if (strcmp(first->string, second->string)) return t; } return (strcmp(first->car->string, second->car->string) || - (first->cdr != nil && second->cdr != nil)) ? t : f; + strcmp(first->cdr->string, second->cdr->string)) ? t : f; } else return t; |
