aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control
diff options
context:
space:
mode:
authorPaul Gilbert2016-11-01 21:06:10 -0400
committerPaul Gilbert2016-11-01 21:06:10 -0400
commit088cc0bff8cd39ddbe829867fd26cd5ba4a4aaba (patch)
tree06a7895fe22c2046a191420674d8714413f62771 /engines/titanic/pet_control
parent3990eb22771da74ce0e65d1fbe40fb69dda0bb64 (diff)
downloadscummvm-rg350-088cc0bff8cd39ddbe829867fd26cd5ba4a4aaba.tar.gz
scummvm-rg350-088cc0bff8cd39ddbe829867fd26cd5ba4a4aaba.tar.bz2
scummvm-rg350-088cc0bff8cd39ddbe829867fd26cd5ba4a4aaba.zip
TITANIC: Fix loading of conversation log
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r--engines/titanic/pet_control/pet_text.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/pet_control/pet_text.cpp
index 1aa9b804ff..78dceb7a31 100644
--- a/engines/titanic/pet_control/pet_text.cpp
+++ b/engines/titanic/pet_control/pet_text.cpp
@@ -87,7 +87,7 @@ CString CPetText::getColorText(byte r, byte g, byte b) {
void CPetText::load(SimpleFile *file, int param) {
if (!param) {
uint numLines = file->readNumber();
- uint charsPerLine = file->readNumber();
+ int charsPerLine = file->readNumber();
uint count = file->readNumber();
_bounds = file->readRect();
_unused1 = file->readNumber();
@@ -102,8 +102,9 @@ void CPetText::load(SimpleFile *file, int param) {
_hasBorder = file->readNumber() != 0;
_scrollTop = file->readNumber();
- resize(numLines);
setMaxCharsPerLine(charsPerLine);
+ resize(numLines);
+ _lineCount = (count == 0) ? 0 : count - 1;
assert(_array.size() >= count);
for (uint idx = 0; idx < count; ++idx) {