Commit 357bfb99 authored by Hanspeter Portner's avatar Hanspeter Portner

nk: fix subsequent bug introduced by prev commit.

parent b21cfb58
Pipeline #17942093 passed with stages
in 4 minutes and 21 seconds
......@@ -2000,7 +2000,7 @@ _set_string(struct nk_str *str, uint32_t size, const char *body)
nk_str_clear(str);
// replace tab with 2 spaces
const char *end = (size > 0) && (body[size - 1] == '\n')
const char *end = (size > 0) && ( (body[size - 1] == '\n') || (body[size - 1] == '\0') )
? body + size - 1 // ignore newline in sane files
: body + size; // handle non-sane files without a newline
const char *from = body;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment