compuphase/minIni

wrong assert in save_strncpy

skycetus opened this issue · 1 comments

This code at beginning of save_strncpy has an error:
assert(dest <= source || dest >= source + maxlen);

Because maxlen is a target attribute I expect somewhat like in second part:
dest > source + strlen(source)
For example, ini_gets fails if Buffer placed in memory immediatelly after very short DefValue.

Also, I expect that dest should be filled by '\', when both option == QUOTE_ENQUOTE and dest == source.

Fixed in commit 7790836.
Thank you for the report.