diff options
-rw-r--r-- | src/serializer.cpp | 4 | ||||
-rw-r--r-- | src/staticstring.h | 2 |
2 files changed, 3 insertions, 3 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 | ||
187 | Serializer &operator<<( Serializer &ar, std::string &s ) | 187 | Serializer &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 | ||
193 | Serializer &operator>>( Serializer &ar, std::string &s ) | 193 | Serializer &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'; |
diff --git a/src/staticstring.h b/src/staticstring.h index 68ca7ea..61501bf 100644 --- a/src/staticstring.h +++ b/src/staticstring.h | |||
@@ -54,7 +54,7 @@ public: | |||
54 | 54 | ||
55 | private: | 55 | private: |
56 | char *lpStr; | 56 | char *lpStr; |
57 | int nLen; | 57 | uint32_t nLen; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | #endif | 60 | #endif |