This commit is contained in:
2022-09-03 06:58:50 +10:00
parent 4625efecfd
commit 6c151e21b0
4 changed files with 62 additions and 25 deletions

View File

@@ -277,9 +277,12 @@ bool literalsAreEqual(Literal lhs, Literal rhs) {
}
//compare the values
if (!literalsAreEqual(AS_DICTIONARY(lhs)->entries[i].value, getLiteralDictionary(AS_DICTIONARY(rhs), AS_DICTIONARY(lhs)->entries[i].key) )) {
Literal val = getLiteralDictionary(AS_DICTIONARY(rhs), AS_DICTIONARY(lhs)->entries[i].key); //TODO: could be more efficient
if (!literalsAreEqual(AS_DICTIONARY(lhs)->entries[i].value, val)) {
freeLiteral(val);
return false;
}
freeLiteral(val);
}
}