mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Saveload: Fix return type of SlReadUint16
This commit is contained in:
parent
89d2cf3a16
commit
cef83e30b5
@ -1067,7 +1067,7 @@ void SlSaveLoadRef(void *ptr, VarType conv)
|
||||
break;
|
||||
case SLA_LOAD_CHECK:
|
||||
case SLA_LOAD:
|
||||
*(size_t *)ptr = IsSavegameVersionBefore(SLV_69) ? SlReadUint16() : SlReadUint32();
|
||||
*(size_t *)ptr = IsSavegameVersionBefore(SLV_69) ? (size_t)SlReadUint16() : SlReadUint32();
|
||||
break;
|
||||
case SLA_PTRS:
|
||||
*(void **)ptr = IntToReference(*(size_t *)ptr, (SLRefType)conv);
|
||||
|
@ -611,7 +611,7 @@ void SlSkipBytes(size_t length)
|
||||
return _sl.reader->SkipBytes(length);
|
||||
}
|
||||
|
||||
int SlReadUint16()
|
||||
uint16_t SlReadUint16()
|
||||
{
|
||||
_sl.reader->CheckBytes(2);
|
||||
return _sl.reader->RawReadUint16();
|
||||
@ -1533,7 +1533,7 @@ void SlSaveLoadRef(void *ptr, VarType conv)
|
||||
break;
|
||||
case SLA_LOAD_CHECK:
|
||||
case SLA_LOAD:
|
||||
*(size_t *)ptr = IsSavegameVersionBefore(SLV_69) ? SlReadUint16() : SlReadUint32();
|
||||
*(size_t *)ptr = IsSavegameVersionBefore(SLV_69) ? (size_t)SlReadUint16() : SlReadUint32();
|
||||
break;
|
||||
case SLA_PTRS:
|
||||
*(void **)ptr = IntToReference(*(size_t *)ptr, (SLRefType)conv);
|
||||
|
@ -423,7 +423,7 @@ enum SaveLoadVersion : uint16_t {
|
||||
uint8_t SlReadByte();
|
||||
void SlWriteByte(uint8_t b);
|
||||
|
||||
int SlReadUint16();
|
||||
uint16_t SlReadUint16();
|
||||
uint32_t SlReadUint32();
|
||||
uint64_t SlReadUint64();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user