diff --git a/extlib/benz/string.c b/extlib/benz/string.c index 8027a36e..0472fae3 100644 --- a/extlib/benz/string.c +++ b/extlib/benz/string.c @@ -120,8 +120,8 @@ rope_at(struct pic_rope *x, size_t i) if (i < x->left->weight) { x = x->left; } else { - x = x->right; i -= x->left->weight; + x = x->right; } } return -1;