aboutsummaryrefslogtreecommitdiff
path: root/buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'buf.c')
-rw-r--r--buf.c1
1 files changed, 1 insertions, 0 deletions
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;