diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-12-22 09:12:56 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-12-22 09:14:58 +0100 |
| commit | c240368d5da8208c15e0263034384414d938afb3 (patch) | |
| tree | 409ff08a60386ce3411ce631b238212b95295121 | |
| parent | 811fadc9f7aca0287af3755bacfe77da363a15b2 (diff) | |
| download | vis-c240368d5da8208c15e0263034384414d938afb3.tar.gz vis-c240368d5da8208c15e0263034384414d938afb3.tar.xz | |
text: avoid undefined multiple accesses in expression
Work around for a (bogus?) tis-interpreter warning.
| -rw-r--r-- | text.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1341,13 +1341,14 @@ const char *text_newline_char(Text *txt) { } static bool text_iterator_init(Iterator *it, size_t pos, Piece *p, size_t off) { - *it = (Iterator){ + Iterator iter = (Iterator){ .pos = pos, .piece = p, .start = p ? p->data : NULL, .end = p ? p->data + p->len : NULL, .text = p ? p->data + off : NULL, }; + *it = iter; return text_iterator_valid(it); } |
