Commit c77929bb authored by Nicolas Denoyelle's avatar Nicolas Denoyelle

fix order bug

parent 424b417e
......@@ -116,7 +116,8 @@ static ssize_t tleaf_it_value(struct tleaf_it_s *it)
ssize_t i, acc = 1, val = 0;
for (i = 0; i < it->depth; i++) {
val += acc * it->buf[it->order[it->depth - i - 1]];
/* levels are stacked following order, then decode result backward order_inverse */
val += acc * it->buf[it->order_inverse[it->depth - i - 1]];
acc *= it->arities[it->depth - i - 1];
}
return val;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment