aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2010-02-20 10:37:08 +0000
committerPaul Gilbert2010-02-20 10:37:08 +0000
commita57445e847ca241f69efc3c043962b80b82cf37d (patch)
tree7727dd0711a09b94eb6806a2d910dbddc98ae418
parent734c922f169f8f18e75753a0007706eb9890107c (diff)
downloadscummvm-rg350-a57445e847ca241f69efc3c043962b80b82cf37d.tar.gz
scummvm-rg350-a57445e847ca241f69efc3c043962b80b82cf37d.tar.bz2
scummvm-rg350-a57445e847ca241f69efc3c043962b80b82cf37d.zip
Put in a warning in case there is ever too long a background resource name when saving a game
svn-id: r48095
-rw-r--r--engines/cruise/saveload.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp
index af39ae1eb4..6e50ef8cdb 100644
--- a/engines/cruise/saveload.cpp
+++ b/engines/cruise/saveload.cpp
@@ -150,6 +150,9 @@ static void syncBasicInfo(Common::Serializer &s) {
static void syncBackgroundTable(Common::Serializer &s) {
// restore backgroundTable
for (int i = 0; i < 8; i++) {
+ if (s.isSaving() && (strlen(backgroundTable[i].name) > 8))
+ warning("Saving a background resource that has too long a name");
+
s.syncBytes((byte *)backgroundTable[i].name, 9);
s.syncBytes((byte *)backgroundTable[i].extention, 6);
}