summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-03-15 21:07:09 +0000
committertron <tron@openttd.org>2005-03-15 21:07:09 +0000
commit50535a88bfe67d0ce618bc3be290da5ba1e6eb5e (patch)
tree6c9a39739bc85b09b87fbcb19dae973717426235
parentbb88bc5a9758a8d6ff272c723f5ca23a18ff8542 (diff)
downloadopenttd-50535a88bfe67d0ce618bc3be290da5ba1e6eb5e.tar.xz
(svn r2018) Yet another workaround
-rw-r--r--saveload.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/saveload.c b/saveload.c
index 318519d86..f5efb28c4 100644
--- a/saveload.c
+++ b/saveload.c
@@ -60,12 +60,17 @@ static void NORETURN SlError(const char *msg)
longjmp(_sl.excpt, 0);
}
-inline int SlReadByte(void)
+static inline int SlReadByteInternal(void)
{
if (_sl.bufp == _sl.bufe) SlReadFill();
return *_sl.bufp++;
}
+int SlReadByte(void)
+{
+ return SlReadByteInternal();
+}
+
void SlWriteByte(byte v)
{
if (_sl.bufp == _sl.bufe) SlWriteFill();
@@ -230,7 +235,7 @@ static void SlCopyBytes(void *ptr, size_t length)
}
} else {
while(length) {
- *p++ = SlReadByte();
+ *p++ = SlReadByteInternal();
length--;
}
}