shithub: riscv

Download patch

ref: 6a83facfb3f64f579847166af0321370e4062f9d
parent: 7c503e6f49b140a99535c317092cc2f32d2a7140
author: cinap_lenrek <[email protected]>
date: Sat Jan 11 05:46:07 EST 2014

rio: properly handle initial wrap arround in wlook()

--- a/sys/src/cmd/rio/wind.c
+++ b/sys/src/cmd/rio/wind.c
@@ -900,6 +900,9 @@
 	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++;