From b5648963a73cf8b84428cf7b305edd1028391ced Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Fri, 30 Oct 2020 09:07:09 -0400 Subject: [PATCH] Correct string equality check --- src/pebblisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pebblisp.c b/src/pebblisp.c index 9634cdd..accd9af 100644 --- a/src/pebblisp.c +++ b/src/pebblisp.c @@ -242,7 +242,7 @@ Object _basicOp(const Object *obj1, const Object *obj2, const char op, return numberObject(n1 % n2); case '=': - if(obj1->type == TYPE_STRING || obj2->type == TYPE_STRING) + if(obj1->type == TYPE_STRING && obj2->type == TYPE_STRING) return boolObject(!strcmp(obj1->string, obj2->string)); if(obj1->type == TYPE_LIST && obj2->type == TYPE_LIST) return listEquality(obj1, obj2);