2
0
mirror of https://github.com/boostorg/mpi.git synced 2026-01-19 04:22:10 +00:00

Fix buffer primitive load and save for CharType != char

This commit is contained in:
Maksim Petukhou
2021-10-27 21:56:23 +03:00
parent 511a556eb9
commit 8494fffb5b
2 changed files with 2 additions and 2 deletions

View File

@@ -100,7 +100,7 @@ public:
#endif
s.resize(l);
// note breaking a rule here - could be a problem on some platform
load_impl(const_cast<char *>(s.data()),l);
load_impl(const_cast<CharType *>(s.data()), l*sizeof(CharType));
}
private:

View File

@@ -89,7 +89,7 @@ public:
{
unsigned int l = static_cast<unsigned int>(s.size());
save(l);
save_impl(s.data(),s.size());
save_impl(s.data(),s.size()*sizeof(CharType));
}
private: