diff options
Diffstat (limited to 'text.c')
| -rw-r--r-- | text.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -799,14 +799,13 @@ bool text_mmaped(const Text *txt, const char *ptr) { } static bool iterator_init(Iterator *it, size_t pos, Piece *p, size_t off) { - Iterator iter = (Iterator){ + *it = (Iterator){ .pos = pos, .piece = p, .start = p ? p->data : NULL, .end = p && p->data ? p->data + p->len : NULL, .text = p && p->data ? p->data + off : NULL, }; - *it = iter; return text_iterator_valid(it); } |
