[Scummvm-git-logs] scummvm master -> 7b48934598d448a8d3ccf8bfdd0e954862b7fcfe

bonki bonki at users.noreply.github.com
Tue May 1 22:34:39 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7b48934598 SCUMM: Protect autosave (slot 0) from deletion/overwriting


Commit: 7b48934598d448a8d3ccf8bfdd0e954862b7fcfe
    https://github.com/scummvm/scummvm/commit/7b48934598d448a8d3ccf8bfdd0e954862b7fcfe
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-05-01T22:34:00+02:00

Commit Message:
SCUMM: Protect autosave (slot 0) from deletion/overwriting

Changed paths:
    engines/scumm/detection.cpp


diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 37302e3..9573db5 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -1324,6 +1324,14 @@ SaveStateDescriptor ScummMetaEngine::querySaveMetaInfos(const char *target, int
 	}
 
 	SaveStateDescriptor desc(slot, saveDesc);
+
+	// Do not allow save slot 0 (used for auto-saving) to be deleted or
+	// overwritten.
+	if (slot == 0) {
+		desc.setWriteProtectedFlag(true);
+		desc.setDeletableFlag(false);
+	}
+
 	desc.setThumbnail(thumbnail);
 
 	if (infoPtr) {





More information about the Scummvm-git-logs mailing list