diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-09-22 20:51:40 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-09-22 20:51:40 +0000 |
commit | 6b9bb6bf64f845d80965716df257afc2885a3690 (patch) | |
tree | a77ff4abd395e905aec6d043382a821faaf1ff12 /src/serializer.cpp | |
parent | cbb54cab8e7258afb72785391ad69c6918d8f38d (diff) | |
download | libbu++-6b9bb6bf64f845d80965716df257afc2885a3690.tar.gz libbu++-6b9bb6bf64f845d80965716df257afc2885a3690.tar.bz2 libbu++-6b9bb6bf64f845d80965716df257afc2885a3690.tar.xz libbu++-6b9bb6bf64f845d80965716df257afc2885a3690.zip |
I beleive I fixed the inconsistancies for 64bit machines.
Diffstat (limited to 'src/serializer.cpp')
-rw-r--r-- | src/serializer.cpp | 4 |
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 | ||
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'; |