[bugfix] rope_at
This commit is contained in:
parent
bb2f9c0367
commit
ec9c0e8841
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue