summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 6da990e5b8..ad8baf87c1 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1478,14 +1478,14 @@ void writeString(FILE* file, const std::string &s, int cap)
int length = s.length();
if (length > cap)
length = cap;
- writeShort(file, length);
+ writeLong(file, length);
if (length)
write2(file, s.c_str(), length);
}
std::string readString(FILE *file, int cap)
{
- short length = readShort(file);
+ const int length = readLong(file);
if (length > 0)
{
if (length <= cap)