mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r2018) Yet another workaround
This commit is contained in:
parent
dad3d12406
commit
195e515de1
@ -60,12 +60,17 @@ static void NORETURN SlError(const char *msg)
|
|||||||
longjmp(_sl.excpt, 0);
|
longjmp(_sl.excpt, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int SlReadByte(void)
|
static inline int SlReadByteInternal(void)
|
||||||
{
|
{
|
||||||
if (_sl.bufp == _sl.bufe) SlReadFill();
|
if (_sl.bufp == _sl.bufe) SlReadFill();
|
||||||
return *_sl.bufp++;
|
return *_sl.bufp++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int SlReadByte(void)
|
||||||
|
{
|
||||||
|
return SlReadByteInternal();
|
||||||
|
}
|
||||||
|
|
||||||
void SlWriteByte(byte v)
|
void SlWriteByte(byte v)
|
||||||
{
|
{
|
||||||
if (_sl.bufp == _sl.bufe) SlWriteFill();
|
if (_sl.bufp == _sl.bufe) SlWriteFill();
|
||||||
@ -230,7 +235,7 @@ static void SlCopyBytes(void *ptr, size_t length)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
while(length) {
|
while(length) {
|
||||||
*p++ = SlReadByte();
|
*p++ = SlReadByteInternal();
|
||||||
length--;
|
length--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user