mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-05 18:41:12 +00:00
MACVENTURE: Fix upper limit in savefile names
This commit is contained in:
parent
059c9a64d9
commit
1210f05842
@ -63,8 +63,8 @@ SaveStateDescriptor loadMetaData(Common::SeekableReadStream *s, int slot) {
|
||||
}
|
||||
|
||||
void writeMetaData(Common::OutSaveFile *file, Common::String desc) {
|
||||
if (desc.size() >= (1 << (MACVENTURE_DESC_LENGTH * 4))) {
|
||||
desc.erase((1 << (MACVENTURE_DESC_LENGTH * 4)) - 1);
|
||||
if (desc.size() >= (1 << (MACVENTURE_DESC_LENGTH * 8))) {
|
||||
desc.erase((1 << (MACVENTURE_DESC_LENGTH * 8)) - 1);
|
||||
}
|
||||
file->writeString(desc);
|
||||
file->writeUint32BE(MACVENTURE_SAVE_HEADER);
|
||||
@ -121,8 +121,8 @@ bool MacVentureEngine::scummVMSaveLoadDialog(bool isSave) {
|
||||
desc = dialog.createDefaultSaveDescription(slot);
|
||||
}
|
||||
|
||||
if (desc.size() > (1 << MACVENTURE_DESC_LENGTH * 4) - 1)
|
||||
desc = Common::String(desc.c_str(), (1 << MACVENTURE_DESC_LENGTH * 4) - 1);
|
||||
if (desc.size() > (1 << MACVENTURE_DESC_LENGTH * 8) - 1)
|
||||
desc = Common::String(desc.c_str(), (1 << MACVENTURE_DESC_LENGTH * 8) - 1);
|
||||
|
||||
if (slot < 0)
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user