Fix various possible integer type conversion issues
This commit is contained in:
@@ -68,7 +68,7 @@ static void Load_MAPT()
|
||||
|
||||
static void Check_MAPH_common()
|
||||
{
|
||||
if (_sl_maybe_chillpp && (SlGetFieldLength() == 0 || SlGetFieldLength() == _map_dim_x * _map_dim_y * 2)) {
|
||||
if (_sl_maybe_chillpp && (SlGetFieldLength() == 0 || SlGetFieldLength() == (size_t)_map_dim_x * (size_t)_map_dim_y * 2)) {
|
||||
_sl_maybe_chillpp = false;
|
||||
extern void SlXvChillPPSpecialSavegameVersions();
|
||||
SlXvChillPPSpecialSavegameVersions();
|
||||
|
||||
@@ -345,7 +345,7 @@ static void Load_TOWN()
|
||||
uint16 w = SlReadUint16();
|
||||
uint16 h = SlReadUint16();
|
||||
if (w != 0) {
|
||||
SlSkipBytes((SlXvIsFeaturePresent(XSLFI_TOWN_CARGO_MATRIX) ? 8 : 4) * (w / 4 * h / 4));
|
||||
SlSkipBytes((SlXvIsFeaturePresent(XSLFI_TOWN_CARGO_MATRIX) ? 8 : 4) * ((uint)(w / 4) * (uint)(h / 4)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user