# HG changeset patch # User František Kučera # Date 1650706290 -7200 # Node ID d698d34baf9b99f7537db5ff84f2eb6a3a5f6dec # Parent b717a552e63f1f155b2aa3b39aa49c9f791083c1 do not stop at null byte 0x00; replace them with '@' II diff -r b717a552e63f -r d698d34baf9b src/NullByteHandler.h --- a/src/NullByteHandler.h Sat Apr 23 11:29:21 2022 +0200 +++ b/src/NullByteHandler.h Sat Apr 23 11:31:30 2022 +0200 @@ -52,7 +52,10 @@ void attribute(const string_t& value) override { const std::string octets = convertor.to_bytes(value); - for (char ch : octets) output.put(ch ? ch : '@'); + for (char ch : octets) { + if (ch) output.put(ch); + else output.put('@'); // TODO: configurable replacement, maybe a string instead of a single char + } output.put(0); }