summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/cmd/rio/wind.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/src/cmd/rio/wind.c b/sys/src/cmd/rio/wind.c
index 0c33c9616..fb117b614 100644
--- a/sys/src/cmd/rio/wind.c
+++ b/sys/src/cmd/rio/wind.c
@@ -900,6 +900,9 @@ wlook(Window *w)
if(n <= 0 || e < n)
return;
+ if(i > e)
+ i = 0;
+
while(runestrncmp(w->r+w->q0, w->r+i, n) != 0){
if(i < e)
i++;