Closed kabukunz closed 3 years ago
Hi,
I'll take a look. In the mean time, if you do not write to the file you can pass false as the second argument. The default true
means it will save the file on destruction if any item is modified.
Did you use the latest version (master branch or release 1.10.0)?
This commit some time ago fixed an issue that caused a segfault with such a file: https://github.com/aslze/asl/commit/4fecd690ec66aa4aa061c4a0815cbdd8bf8f5f79
OTOH, I saw another related problem that I'll try to solve (if calling explicitly config.write() to write it before destruction).
I've tried just now calling write while updating some values. The offending line is deleted; it just disappears. I've not updated to the commit you pointed still; forgot to mention I'm on commit 8cf1a24845e9bc30909bd5917cd5c97ed6f02439 (tag: 1.8.0) HTH
Ok I think this is solved, closing it
Hello, if I create an .ini file like this:
The string "asasjdh" generates a memory corruption with an unrecoverable segfault out of the .cpp unit which reads it... Reading the file like this:
IniFile config(finalConfigFile, false);
gives no problems whatsoever, but if read with writing option set:
IniFile config(finalConfigFile, true);
the segfault breaks the unit when it returns to the caller. HTH