MACVENTURE: Fix upper limit in savefile names
This commit is contained in:
parent
059c9a64d9
commit
1210f05842
1 changed files with 4 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue