allow serialization of strings containing null byte 0x00 v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Fri, 22 Apr 2022 23:47:08 +0200
branchv_0
changeset 57 08c392fc66e4
parent 56 4bd3bc41b579
child 58 25c1ff79297c
allow serialization of strings containing null byte 0x00 do not trim at first 0x00 and fulfill declared value length
src/types/StringDataTypeWriter.h
--- a/src/types/StringDataTypeWriter.h	Fri Apr 22 23:43:07 2022 +0200
+++ b/src/types/StringDataTypeWriter.h	Fri Apr 22 23:47:08 2022 +0200
@@ -48,7 +48,7 @@
 	void writeValue(std::ostream &output, const string_t &value) override {
 		std::string s = convertor.to_bytes(value);
 		integerType.writeValue(output, s.length());
-		output << s.c_str();
+		output << s;
 	}
 
 	wstring toValue(const string_t &stringValue) override {