Skip to content
Snippets Groups Projects
Commit 7bdc328a authored by Perttu Ahola's avatar Perttu Ahola
Browse files

Fix yet-another serialization error in utility.h and set constructor of Buffer...

Fix yet-another serialization error in utility.h and set constructor of Buffer take const data for copying
parent e71744b9
No related branches found
No related tags found
No related merge requests found
......@@ -225,7 +225,7 @@ inline u16 readU16(std::istream &is)
inline void writeU32(std::ostream &os, u32 p)
{
char buf[4];
writeU16((u8*)buf, p);
writeU32((u8*)buf, p);
os.write(buf, 4);
}
inline u32 readU32(std::istream &is)
......@@ -367,7 +367,7 @@ class Buffer
else
data = NULL;
}
Buffer(T *t, unsigned int size)
Buffer(const T *t, unsigned int size)
{
m_size = size;
if(size != 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment