diff options
author | Holden Rohrer <hr@hrhr.dev> | 2020-03-30 23:52:18 -0400 |
---|---|---|
committer | Holden Rohrer <hr@hrhr.dev> | 2020-03-30 23:52:18 -0400 |
commit | 7b09cacea5008106a3f0964d47fdf54bf4ff5a58 (patch) | |
tree | 53dd66cf695a4a5c721c79e83fdc5f27c51b88df | |
parent | 500d4ee1346a6a783e7a52f2fc703b742aa53079 (diff) |
peekstrbuf didn't cycle through nodes (bug)
-rw-r--r-- | buf.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |