diff options
| author | Tyge Løvset <[email protected]> | 2021-12-29 12:52:21 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-12-29 13:52:16 +0100 |
| commit | 7115f4539b7d08ec21c5e6132841b2613a74059d (patch) | |
| tree | 8e306daecf0f5452105aa00586f6eb975455c34d /include | |
| parent | 48e9d858da36b0fee7787edd12e7f336ccdf04b4 (diff) | |
| download | STC-modified-7115f4539b7d08ec21c5e6132841b2613a74059d.tar.gz STC-modified-7115f4539b7d08ec21c5e6132841b2613a74059d.zip | |
Update of README.md docs describing version 3.
Diffstat (limited to 'include')
| -rw-r--r-- | include/stc/csview.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/csview.h b/include/stc/csview.h index 69de5749..c4844bfb 100644 --- a/include/stc/csview.h +++ b/include/stc/csview.h @@ -143,8 +143,8 @@ STC_DEF csview csview_token(csview sv, csview sep, size_t* start) {
csview slice = {sv.str + *start, sv.size - *start};
const char* res = c_strnstrn(slice.str, sep.str, slice.size, sep.size);
- csview tok = {slice.str, (res ? res - slice.str : slice.size)};
- *start += tok.size + (res ? sep.size : 0);
+ csview tok = {slice.str, res ? res - slice.str : (sep.size = 0, slice.size)};
+ *start += tok.size + sep.size;
return tok;
}
|
