do not stop at null byte 0x00; replace them with '@' I v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 23 Apr 2022 11:29:21 +0200
branchv_0
changeset 23 b717a552e63f
parent 22 78b8abedb7f0
child 24 d698d34baf9b
do not stop at null byte 0x00; replace them with '@' I
src/NullByteHandler.h
--- a/src/NullByteHandler.h	Sat Dec 04 21:14:52 2021 +0100
+++ b/src/NullByteHandler.h	Sat Apr 23 11:29:21 2022 +0200
@@ -51,7 +51,8 @@
 	}
 
 	void attribute(const string_t& value) override {
-		output << convertor.to_bytes(value).c_str();
+		const std::string octets = convertor.to_bytes(value);
+		for (char ch : octets) output.put(ch ? ch : '@');
 		output.put(0);
 	}