[Scummvm-git-logs] scummvm master -> 088cc0bff8cd39ddbe829867fd26cd5ba4a4aaba

dreammaster dreammaster at scummvm.org
Wed Nov 2 02:06:25 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
088cc0bff8 TITANIC: Fix loading of conversation log


Commit: 088cc0bff8cd39ddbe829867fd26cd5ba4a4aaba
    https://github.com/scummvm/scummvm/commit/088cc0bff8cd39ddbe829867fd26cd5ba4a4aaba
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-11-01T21:06:10-04:00

Commit Message:
TITANIC: Fix loading of conversation log

Changed paths:
    engines/titanic/pet_control/pet_text.cpp



diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/pet_control/pet_text.cpp
index 1aa9b80..78dceb7 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) {





More information about the Scummvm-git-logs mailing list