From 7b09cacea5008106a3f0964d47fdf54bf4ff5a58 Mon Sep 17 00:00:00 2001
From: Holden Rohrer
Date: Mon, 30 Mar 2020 23:52:18 -0400
Subject: peekstrbuf didn't cycle through nodes (bug)
---
buf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/buf.c b/buf.c
index 65bc7a7..a219773 100644
--- a/buf.c
+++ b/buf.c
@@ -105,6 +105,7 @@ char* peekstrbuf(buf* buffer, size_t loc, size_t len){
for (size_t tgt = 0; len > 0; len -= bytect, tgt += bytect){
bytect = min(buffer->cap - loc, len);
memcpy(str+tgt, start->text+loc, bytect);
+ start = start->next;
loc = 0;
}
return str;
--
cgit