summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-09-22 20:51:40 +0000
committerMike Buland <eichlan@xagasoft.com>2006-09-22 20:51:40 +0000
commit6b9bb6bf64f845d80965716df257afc2885a3690 (patch)
treea77ff4abd395e905aec6d043382a821faaf1ff12 /src
parentcbb54cab8e7258afb72785391ad69c6918d8f38d (diff)
downloadlibbu++-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')
-rw-r--r--src/serializer.cpp4
-rw-r--r--src/staticstring.h2
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
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';
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
55private: 55private:
56 char *lpStr; 56 char *lpStr;
57 int nLen; 57 uint32_t nLen;
58}; 58};
59 59
60#endif 60#endif