diff --git a/subtree/rabit/include/dmlc/io.h b/subtree/rabit/include/dmlc/io.h index 1b7d70498..8caf2a1f7 100644 --- a/subtree/rabit/include/dmlc/io.h +++ b/subtree/rabit/include/dmlc/io.h @@ -303,7 +303,7 @@ inline void Stream::Write(const std::vector &vec) { uint64_t sz = static_cast(vec.size()); this->Write(&sz, sizeof(sz)); if (sz != 0) { - this->Write(&vec[0], sizeof(T) * sz); + this->Write(&vec[0], sizeof(T) * vec.size()); } } template @@ -320,7 +320,7 @@ inline void Stream::Write(const std::string &str) { uint64_t sz = static_cast(str.length()); this->Write(&sz, sizeof(sz)); if (sz != 0) { - this->Write(&str[0], sizeof(char) * sz); + this->Write(&str[0], sizeof(char) * str.length()); } } inline bool Stream::Read(std::string *out_str) { diff --git a/subtree/rabit/windows/rabit/rabit.vcxproj b/subtree/rabit/windows/rabit/rabit.vcxproj index 36ac12658..12cb43e07 100644 --- a/subtree/rabit/windows/rabit/rabit.vcxproj +++ b/subtree/rabit/windows/rabit/rabit.vcxproj @@ -34,7 +34,7 @@ MultiByte - Application + DynamicLibrary false true MultiByte @@ -86,6 +86,7 @@ MaxSpeed true true + MultiThreaded true