summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tags.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-15 23:12:17 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-15 23:12:17 +0000
commit8d0205570b4dd7c1b647791e018ee4a05bc6250a (patch)
treeb35e2eeec3fbcaa67918a7a3ec41913d49213f37 /crawl-ref/source/tags.h
parente7a22ae2c3721277180443d930d110edb7e180b8 (diff)
downloadcrawl-ref-8d0205570b4dd7c1b647791e018ee4a05bc6250a.tar.gz
crawl-ref-8d0205570b4dd7c1b647791e018ee4a05bc6250a.zip
trunk->0.3 backport: r6563 [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/branches/stone_soup-0.4@6571 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tags.h')
-rw-r--r--crawl-ref/source/tags.h11
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);