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.
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.