From 6b9bb6bf64f845d80965716df257afc2885a3690 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 22 Sep 2006 20:51:40 +0000 Subject: I beleive I fixed the inconsistancies for 64bit machines. --- src/serializer.cpp | 4 ++-- src/staticstring.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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) Serializer &operator<<( Serializer &ar, std::string &s ) { - ar << s.length(); + ar << (uint32_t)s.length(); ar.write( s.c_str(), s.length() ); } Serializer &operator>>( Serializer &ar, std::string &s ) { - int l; + (uint32_t) l; ar >> l; char *tmp = new char[l+1]; 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: private: char *lpStr; - int nLen; + uint32_t nLen; }; #endif -- cgit v1.2.3