diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-15 10:52:00 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:43 +0200 |
commit | 7bdc328a7191024287d9f1e5a24ba4f96fb9ca50 (patch) | |
tree | 99a834cdbeb55568c6de6870952285e71c1ada4b | |
parent | e71744b918898b98ffa5ae949fbf2a1b877b254c (diff) | |
download | minetest-7bdc328a7191024287d9f1e5a24ba4f96fb9ca50.tar.gz minetest-7bdc328a7191024287d9f1e5a24ba4f96fb9ca50.tar.bz2 minetest-7bdc328a7191024287d9f1e5a24ba4f96fb9ca50.zip |
Fix yet-another serialization error in utility.h and set constructor of Buffer take const data for copying
-rw-r--r-- | src/utility.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utility.h b/src/utility.h index 98fa83e89..ed368b208 100644 --- a/src/utility.h +++ b/src/utility.h @@ -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 @@ public: else data = NULL; } - Buffer(T *t, unsigned int size) + Buffer(const T *t, unsigned int size) { m_size = size; if(size != 0) |