diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-15 17:34:50 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-15 17:34:50 +0000 |
commit | 3363a19596a74e799fe35c3e0cf59f82fe56664f (patch) | |
tree | 11cd9bbc9bb24107d7949d884eae21bc16925b30 /crawl-ref/source/tags.h | |
parent | f1b88777017f5ce54b3d22b09fa130751a3cd6e3 (diff) | |
download | crawl-ref-3363a19596a74e799fe35c3e0cf59f82fe56664f.tar.gz crawl-ref-3363a19596a74e799fe35c3e0cf59f82fe56664f.zip |
[2018522] Fixed Lua marker deserialisation bug caused by unmarshallLong not expecting 64-bit longs.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6563 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tags.h')
-rw-r--r-- | crawl-ref/source/tags.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crawl-ref/source/tags.h b/crawl-ref/source/tags.h index dfe48b17e6..1c5cdc8e78 100644 --- a/crawl-ref/source/tags.h +++ b/crawl-ref/source/tags.h @@ -13,7 +13,8 @@ #ifndef TAGS_H #define TAGS_H -#include <stdio.h> +#include <cstdio> +#include <stdint.h> #include "externs.h" enum tag_type // used during save/load process to identify data blocks @@ -85,8 +86,8 @@ private: }; void marshallByte (writer &, char ); -void marshallShort (writer &, short ); -void marshallLong (writer &, long ); +void marshallShort (writer &, int16_t ); +void marshallLong (writer &, int32_t ); void marshallFloat (writer &, float ); void marshallBoolean (writer &, bool ); void marshallString (writer &, const std::string &, int maxSize = 0); @@ -116,8 +117,8 @@ private: }; char unmarshallByte (reader &); -short unmarshallShort (reader &); -long unmarshallLong (reader &); +int16_t unmarshallShort (reader &); +int32_t unmarshallLong (reader &); float unmarshallFloat (reader &); bool unmarshallBoolean (reader &); int unmarshallCString (reader &, char *data, int maxSize); |