aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2016-09-19 10:03:30 +0200
committerEugene Sandulenko2016-09-19 18:13:31 +0200
commit3bf4f3fcbe342d5ddb805e66de1df29541541410 (patch)
tree6cfd9026851d502c0687b0d2ae926c40c112c772 /engines/fullpipe
parent457a2b1cdc1ca71a0e89b619eee249e382526a89 (diff)
downloadscummvm-rg350-3bf4f3fcbe342d5ddb805e66de1df29541541410.tar.gz
scummvm-rg350-3bf4f3fcbe342d5ddb805e66de1df29541541410.tar.bz2
scummvm-rg350-3bf4f3fcbe342d5ddb805e66de1df29541541410.zip
FULLPIPE: Fix crash at load dialog initialization
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/gameloader.cpp3
-rw-r--r--engines/fullpipe/modal.cpp8
2 files changed, 8 insertions, 3 deletions
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index 55db7fb8e3..d1f27814c0 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -712,7 +712,8 @@ bool readSavegameHeader(Common::InSaveFile *in, FullpipeSavegameHeader &header)
// Read in the string
header.saveName.clear();
char ch;
- while ((ch = (char)in->readByte()) != '\0') header.saveName += ch;
+ while ((ch = (char)in->readByte()) != '\0')
+ header.saveName += ch;
// Get the thumbnail
header.thumbnail = Graphics::loadThumbnail(*in);
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 883642952d..5f8afbc761 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -1601,7 +1601,7 @@ void ModalSaveGame::setup(Scene *sc, int mode) {
} else {
w = 0;
- for (int j = 0; j < 16; j++) {
+ for (uint j = 0; j < _arrayL.size(); j++) {
_arrayL[j]->getDimensions(&point);
w += point.x + 2;
}
@@ -1640,7 +1640,11 @@ bool ModalSaveGame::getFileInfo(int slot, FileInfo *fileinfo) {
SaveStateDescriptor desc(slot, header.saveName);
char res[17];
- snprintf(res, 17, "%s %s", desc.getSaveDate().c_str(), desc.getSaveTime().c_str());
+ // FIXME. HACK. TODO: Set proper dates
+ desc.setSaveDate(2016, 9, 18);
+ desc.setSaveTime(9, 56);
+
+ snprintf(res, 17, "%s %s", desc.getSaveDate().c_str(), desc.getSaveTime().c_str());
for (int i = 0; i < 16; i++) {
switch(res[i]) {