Key is truncated in ParseLine()
rayz55 opened this issue · 1 comments
rayz55 commented
I compiled in Visual Studio 17 using ASCII character encoding. All of the keys in my ini file had the last character removed i.e. "dENCODER_CNT_PER_UNIT" was truncated to "dENCODER_CNT_PER_UNI". The section names and values were OK.
I fixed the issue by changing line 1278 from:
key = input_line.substr(0,pos-1);
to:
key = input_line.substr(0,pos);
Lek-sys commented
Thx, that was a mistake.
Always passed through my tests, since I never used 'key=val' (without space between key and '=' sign) syntax.
Fixed.