diff --git a/sn_utils.cpp b/sn_utils.cpp index 6b6ec740..366f81bd 100644 --- a/sn_utils.cpp +++ b/sn_utils.cpp @@ -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)