Skip to content

Commit

Permalink
Fix stats for or and and nodes. Fixes orangeduck#79.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromemberger committed Mar 20, 2018
1 parent e4570b2 commit 9623500
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3644,15 +3644,15 @@ static int mpc_nodecount_unretained(mpc_parser_t* p, int force) {
if (p->type == MPC_TYPE_COUNT) { return 1 + mpc_nodecount_unretained(p->data.repeat.x, 0); }

if (p->type == MPC_TYPE_OR) {
total = 0;
total = 1;
for(i = 0; i < p->data.or.n; i++) {
total += mpc_nodecount_unretained(p->data.or.xs[i], 0);
}
return total;
}

if (p->type == MPC_TYPE_AND) {
total = 0;
total = 1;
for(i = 0; i < p->data.and.n; i++) {
total += mpc_nodecount_unretained(p->data.and.xs[i], 0);
}
Expand Down

0 comments on commit 9623500

Please sign in to comment.