From ec9c0e8841b985b262a85f81929842d69a93a5e4 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Fri, 19 Feb 2016 03:57:15 +0900 Subject: [PATCH] [bugfix] rope_at --- extlib/benz/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;