summaryrefslogtreecommitdiff
path: root/src/archive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive.cpp')
-rw-r--r--src/archive.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/archive.cpp b/src/archive.cpp
index accdeb1..90211fe 100644
--- a/src/archive.cpp
+++ b/src/archive.cpp
@@ -473,7 +473,8 @@ Bu::Archive &Bu::operator>>(Bu::Archive &ar, class Bu::Archival *p )
473 473
474Bu::Archive &Bu::operator<<( Bu::Archive &ar, std::string &s ) 474Bu::Archive &Bu::operator<<( Bu::Archive &ar, std::string &s )
475{ 475{
476 ar << (uint32_t)s.length(); 476 // This should be defined as long anyway, this is just insurance
477 ar << (long)s.length();
477 ar.write( s.c_str(), s.length() ); 478 ar.write( s.c_str(), s.length() );
478 479
479 return ar; 480 return ar;
@@ -481,7 +482,7 @@ Bu::Archive &Bu::operator<<( Bu::Archive &ar, std::string &s )
481 482
482Bu::Archive &Bu::operator>>( Bu::Archive &ar, std::string &s ) 483Bu::Archive &Bu::operator>>( Bu::Archive &ar, std::string &s )
483{ 484{
484 uint32_t l; 485 long l;
485 ar >> l; 486 ar >> l;
486 char *tmp = new char[l+1]; 487 char *tmp = new char[l+1];
487 tmp[l] = '\0'; 488 tmp[l] = '\0';