aboutsummaryrefslogtreecommitdiff
path: root/engines/voyeur/voyeur.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-02-17 16:16:37 -0500
committerPaul Gilbert2014-02-17 16:16:37 -0500
commitdc8b58a0f9a89b9a59cdf6db300e61c4ac7264e9 (patch)
tree85a6ba1b182614aae0c7f918a9b047dd3da7779e /engines/voyeur/voyeur.cpp
parent2725bc88aa538ea73baccc5f9a2ef3f131bb863a (diff)
downloadscummvm-rg350-dc8b58a0f9a89b9a59cdf6db300e61c4ac7264e9.tar.gz
scummvm-rg350-dc8b58a0f9a89b9a59cdf6db300e61c4ac7264e9.tar.bz2
scummvm-rg350-dc8b58a0f9a89b9a59cdf6db300e61c4ac7264e9.zip
VOYEUR: Changed signature check for savegames to use MKTAG
Diffstat (limited to 'engines/voyeur/voyeur.cpp')
-rw-r--r--engines/voyeur/voyeur.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index f2822b4c7c..d7fa92f1cb 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -855,8 +855,8 @@ bool VoyeurSavegameHeader::read(Common::InSaveFile *f) {
char id[4];
_thumbnail = NULL;
- f->read(&id[0], 4);
- if (strncmp(id, "VOYR", 4)) {
+ uint32 signature = f->readUint32BE();
+ if (signature != MKTAG('V', 'O', 'Y', 'R')) {
warning("Invalid savegame");
return false;
}
@@ -888,7 +888,7 @@ bool VoyeurSavegameHeader::read(Common::InSaveFile *f) {
void VoyeurSavegameHeader::write(Common::OutSaveFile *f, VoyeurEngine *vm, const Common::String &saveName) {
// Write ident string
- f->write("VOYR", 4);
+ f->writeUint32BE(MKTAG('V', 'O', 'Y', 'R'));
// Write out savegame version
f->writeByte(VOYEUR_SAVEGAME_VERSION);