I'm currently working on a small project to try and make a rom file manager, and one aspect of this is using libgcrypt to encrypt said rom files. After implementing my own logger however i've encountered a really strange error, using the logger causes the string length of the encrypted text to change unexpectedly, which causes the decryption test to fail. Without the calls to the logger the tests work perfectly, but if i attempt to call the logger everything breaks.
Source code is here:
https://github.com/jjlrjjlr/Ludivum
And the three relevent files are:
https://github.com/jjlrjjlr/Ludivum/blob/master/src/logger/Logger.cpp
https://github.com/jjlrjjlr/Ludivum/blob/master/tests/Test.cpp
https://github.com/jjlrjjlr/Ludivum/blob/master/src/core/Encryption.cpp
And the call to the logger that braeks everything is here:
https://github.com/jjlrjjlr/Ludivum/blob/master/src/core/FileReader.cpp#L15