IniFile icon indicating copy to clipboard operation
IniFile copied to clipboard

Ignoring/truncating lines that are too long?

Open HankLloydRight opened this issue 2 years ago • 3 comments

Hello,

If I change line 423 in IniFile.cpp from:

return errorBufferTooSmall; to return errorNoError;

Would that result in the validate function not returning an error but instead just truncating lines that are too long (instead of returning an invalid file error)?

What's your reasoning behind invalidating the entire file if any lines are longer than the buffer length instead of just silently (or not silently) truncating them?

My thinking is if an end-user inadvertently has one line go over inibufferlen, the entire file is rejected, instead of just the offending line(s).

Thank you.

HankLloydRight avatar Feb 11 '23 20:02 HankLloydRight