Add more brackets

This commit is contained in:
Burkov Egor 2025-07-28 15:11:02 +03:00
parent 5d05ba359c
commit 78b9cb7b57

View File

@ -226,7 +226,7 @@ static void acmp_build_binary_tree(ACMP *parser, acmp_node_t *node) {
/* We have array with all children of the node and number of those children /* We have array with all children of the node and number of those children
*/ */
for (i = 0; i < count - 1; i++) for (i = 0; i < count - 1; i++) {
for (j = i + 1; j < count; j++) { for (j = i + 1; j < count; j++) {
acmp_node_t *tmp; acmp_node_t *tmp;
@ -236,6 +236,7 @@ static void acmp_build_binary_tree(ACMP *parser, acmp_node_t *node) {
nodes[i] = nodes[j]; nodes[i] = nodes[j];
nodes[j] = tmp; nodes[j] = tmp;
} }
}
if (node->btree != NULL) { if (node->btree != NULL) {
free(node->btree); free(node->btree);
node->btree = NULL; node->btree = NULL;