diff options
| author | Tyge Løvset <[email protected]> | 2022-09-24 11:48:07 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-09-24 11:48:07 +0200 |
| commit | 756120e349a892ef1b7655fc777f28ec13845300 (patch) | |
| tree | 34d39e739f94ff52419ac431e1de26e1c431f2c0 /include/stc/csview.h | |
| parent | 26bc208248a0dd0f303d5b80bd298f5100b56e82 (diff) | |
| download | STC-modified-756120e349a892ef1b7655fc777f28ec13845300.tar.gz STC-modified-756120e349a892ef1b7655fc777f28ec13845300.zip | |
Fixes for csview and cstr sub-types (_value and _iter).
Diffstat (limited to 'include/stc/csview.h')
| -rw-r--r-- | include/stc/csview.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/stc/csview.h b/include/stc/csview.h index 2e90c69b..3bb8a542 100644 --- a/include/stc/csview.h +++ b/include/stc/csview.h @@ -91,6 +91,7 @@ STC_INLINE csview_iter csview_advance(csview_iter it, isize_t pos) { if (pos > 0) pos = -pos, inc = 1; while (pos && it.ref != it.u8.end) pos += (*(it.ref += inc) & 0xC0) != 0x80; it.u8.chr.size = utf8_chr_size(it.ref); + if (it.ref == it.u8.end) it.ref = NULL; return it; } |
