aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2015-04-25 03:19:08 -0500
committerPaul Gilbert2015-04-25 03:19:08 -0500
commiteb91c01cf160984f52edf5ba1da3f5db1e2a6519 (patch)
tree1d5db7fc8df3027154f10133512ca72888749b3a /engines/sherlock
parentc6286ec4bd88a4c8a5dc0b5934f8c3241ab2d237 (diff)
downloadscummvm-rg350-eb91c01cf160984f52edf5ba1da3f5db1e2a6519.tar.gz
scummvm-rg350-eb91c01cf160984f52edf5ba1da3f5db1e2a6519.tar.bz2
scummvm-rg350-eb91c01cf160984f52edf5ba1da3f5db1e2a6519.zip
SHERLOCK: Fix paging to end of journal
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/journal.cpp4
-rw-r--r--engines/sherlock/journal.h1
2 files changed, 1 insertions, 4 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp
index 91148a2694..46114cd746 100644
--- a/engines/sherlock/journal.cpp
+++ b/engines/sherlock/journal.cpp
@@ -51,7 +51,6 @@ const int SEARCH_POINTS[3][3] = {
Journal::Journal(SherlockEngine *vm): _vm(vm) {
// Initialize fields
- _count = 0;
_maxPage = 0;
_index = 0;
_sub = 0;
@@ -679,7 +678,7 @@ bool Journal::doJournal(int direction, int howFar) {
if (++_sub == maxLines) {
// Reached end of page
do {
- if (++_index == _count) {
+ if (++_index == (int)_journal.size()) {
_index = savedIndex;
_sub = savedSub;
maxLines = loadJournalFile(false);
@@ -1192,7 +1191,6 @@ void Journal::resetPosition() {
* Synchronize the data for a savegame
*/
void Journal::synchronize(Common::Serializer &s) {
- s.syncAsSint16LE(_count);
s.syncAsSint16LE(_index);
s.syncAsSint16LE(_sub);
s.syncAsSint16LE(_page);
diff --git a/engines/sherlock/journal.h b/engines/sherlock/journal.h
index a67e0e51e2..2ef0f94492 100644
--- a/engines/sherlock/journal.h
+++ b/engines/sherlock/journal.h
@@ -50,7 +50,6 @@ private:
Common::StringArray _directory;
Common::StringArray _locations;
Common::StringArray _lines;
- int _count;
int _maxPage;
int _index;
int _sub;