Fix commit dfc16a348f6bcf

That commit fixes an uninitialized data error found by MSan, but it used
the wrong variable for the comparison that it added. This commit keeps
the uninitialized data error fixed, but it uses the right variable.

Signed-off-by: Gavin Howard <gavin@yzena.com>
diff --git a/src/history.c b/src/history.c
index 83577cd..44fe48a 100644
--- a/src/history.c
+++ b/src/history.c
@@ -482,7 +482,7 @@
 	size_t ret = 0, off = 0;
 
 	// While we haven't reached the offset, get the length of the next grapheme.
-	while (off < pos && pos < buf_len) {
+	while (off < pos && off < buf_len) {
 
 		size_t col_len, len;