summaryrefslogtreecommitdiff
path: root/src/unittest/test_areastore.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-09-11 21:06:57 +0200
committerGitHub <noreply@github.com>2021-09-11 21:06:57 +0200
commit75bf9b75caba5fc876f20eabea3fabc142d1b51e (patch)
treec5a584838498760d0cb5e206795ead223d15527b /src/unittest/test_areastore.cpp
parent766e885a1b1c5afb7a62f11b427b6d135adeab87 (diff)
downloadminetest-75bf9b75caba5fc876f20eabea3fabc142d1b51e.tar.gz
minetest-75bf9b75caba5fc876f20eabea3fabc142d1b51e.tar.bz2
minetest-75bf9b75caba5fc876f20eabea3fabc142d1b51e.zip
Make sure relevant std::stringstreams are set to binary
Diffstat (limited to 'src/unittest/test_areastore.cpp')
-rw-r--r--src/unittest/test_areastore.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/unittest/test_areastore.cpp b/src/unittest/test_areastore.cpp
index 691cd69d2..2af3ca90c 100644
--- a/src/unittest/test_areastore.cpp
+++ b/src/unittest/test_areastore.cpp
@@ -135,7 +135,7 @@ void TestAreaStore::testSerialization()
b.data = "Area BB";
store.insertArea(&b);
- std::ostringstream os;
+ std::ostringstream os(std::ios_base::binary);
store.serialize(os);
std::string str = os.str();
@@ -157,7 +157,7 @@ void TestAreaStore::testSerialization()
UASSERTEQ(const std::string &, str, str_wanted);
- std::istringstream is(str);
+ std::istringstream is(str, std::ios_base::binary);
store.deserialize(is);
// deserialize() doesn't clear the store