Correct string equality check

This commit is contained in:
Sage Vaillancourt 2020-10-30 09:07:09 -04:00
parent b443a54822
commit b5648963a7
1 changed files with 1 additions and 1 deletions

View File

@ -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);