summaryrefslogtreecommitdiff
path: root/src/serializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/serializer.cpp')
-rw-r--r--src/serializer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/serializer.cpp b/src/serializer.cpp
index d41cc64..8c9977d 100644
--- a/src/serializer.cpp
+++ b/src/serializer.cpp
@@ -186,13 +186,13 @@ Serializer &operator>>(Serializer &s, Serializable &p)
186 186
187Serializer &operator<<( Serializer &ar, std::string &s ) 187Serializer &operator<<( Serializer &ar, std::string &s )
188{ 188{
189 ar << s.length(); 189 ar << (uint32_t)s.length();
190 ar.write( s.c_str(), s.length() ); 190 ar.write( s.c_str(), s.length() );
191} 191}
192 192
193Serializer &operator>>( Serializer &ar, std::string &s ) 193Serializer &operator>>( Serializer &ar, std::string &s )
194{ 194{
195 int l; 195 (uint32_t) l;
196 ar >> l; 196 ar >> l;
197 char *tmp = new char[l+1]; 197 char *tmp = new char[l+1];
198 tmp[l] = '\0'; 198 tmp[l] = '\0';