16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 00:49:19 +02:00

fix uint8 serialization

This commit is contained in:
milek7
2020-10-19 13:37:55 +02:00
parent af0052995a
commit fb3b735014

View File

@@ -132,7 +132,7 @@ glm::vec4 sn_utils::d_vec4( std::istream& s )
uint8_t sn_utils::d_uint8( std::istream& s ) {
uint8_t buf;
s.read((char*)buf, 1);
s.read((char*)&buf, 1);
return buf;
}
@@ -221,7 +221,7 @@ void sn_utils::ls_float64(std::ostream &s, double t)
void sn_utils::s_uint8(std::ostream &s, uint8_t v)
{
s.write((char*)v, 1);
s.write((char*)&v, 1);
}
void sn_utils::s_str(std::ostream &s, std::string v)