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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user