No segfaults, still failing tests

This commit is contained in:
2022-09-01 14:00:31 +10:00
parent 3a4017cea5
commit 90b504d3a4
8 changed files with 64 additions and 33 deletions

View File

@@ -78,7 +78,9 @@ Literal copyLiteral(Literal original) {
//copy each element
for (int i = 0; i < AS_ARRAY(original)->count; i++) {
pushLiteralArray(array, copyLiteral(AS_ARRAY(original)->literals[i]));
Literal literal = copyLiteral(AS_ARRAY(original)->literals[i]);
pushLiteralArray(array, literal);
freeLiteral(literal);
}
Literal ret = TO_ARRAY_LITERAL(array);
@@ -93,7 +95,7 @@ Literal copyLiteral(Literal original) {
//copy each element
for (int i = 0; i < AS_ARRAY(original)->count; i++) {
Literal literal = copyLiteral(AS_ARRAY(original)->literals[i]);
pushLiteralArray(array, literal );
pushLiteralArray(array, literal);
freeLiteral(literal);
}