mirror of
https://github.com/neovim/neovim.git
synced 2024-12-25 05:35:10 -07:00
eval/encode: Silence V595 error
This commit is contained in:
parent
7f24736ebc
commit
1db29cb5e5
@ -253,7 +253,9 @@ int encode_read_from_list(ListReaderState *const state, char *const buf,
|
||||
char *const buf_end = buf + nbuf;
|
||||
char *p = buf;
|
||||
while (p < buf_end) {
|
||||
assert(state->li_length == 0 || state->li->li_tv.vval.v_string != NULL);
|
||||
for (size_t i = state->offset; i < state->li_length && p < buf_end; i++) {
|
||||
assert(state->li->li_tv.vval.v_string != NULL);
|
||||
const char ch = (char)state->li->li_tv.vval.v_string[state->offset++];
|
||||
*p++ = (char)((char)ch == (char)NL ? (char)NUL : (char)ch);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user