[Scummvm-git-logs] scummvm master -> 934086eff6a06f48c76c01e1525791483c84cdda

phcoder noreply at scummvm.org
Mon Mar 6 15:17:38 UTC 2023


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

Summary:
bbb946a321 GRIM: Add support for Russian translation (old ENPY)
934086eff6 GRIM: Prevent crash on empty string


Commit: bbb946a32108231dbe0e551f538b18ebba914a7d
    https://github.com/scummvm/scummvm/commit/bbb946a32108231dbe0e551f538b18ebba914a7d
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-03-06T16:17:33+01:00

Commit Message:
GRIM: Add support for Russian translation (old ENPY)

Changed paths:
    engines/grim/localize.cpp


diff --git a/engines/grim/localize.cpp b/engines/grim/localize.cpp
index cf0808d3467..5c3bf570e31 100644
--- a/engines/grim/localize.cpp
+++ b/engines/grim/localize.cpp
@@ -100,6 +100,7 @@ Localizer::Localizer() {
 		case MKTAG('a', 'r', 't', 'p'):
 		case MKTAG('s', 's', 'I', 'N'):
 		case MKTAG('I', 'N', 'T', 'T'):
+		case MKTAG('6', '6', '6', 'I'):
 			break;
 		default:
 			error("Invalid magic reading %s: %08x (%s)", filename.c_str(), READ_BE_UINT32(data), tag2str(READ_BE_UINT32(data)));


Commit: 934086eff6a06f48c76c01e1525791483c84cdda
    https://github.com/scummvm/scummvm/commit/934086eff6a06f48c76c01e1525791483c84cdda
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2023-03-06T16:17:33+01:00

Commit Message:
GRIM: Prevent crash on empty string

Changed paths:
    engines/grim/textobject.cpp


diff --git a/engines/grim/textobject.cpp b/engines/grim/textobject.cpp
index 8ec3b8c1ae5..99d03287410 100644
--- a/engines/grim/textobject.cpp
+++ b/engines/grim/textobject.cpp
@@ -177,6 +177,7 @@ void TextObject::setupText() {
 	delete[] _lines;
 	if (msg.size() == 0) {
 		_lines = nullptr;
+		_numberLines = 0;
 		return;
 	}
 
@@ -288,6 +289,8 @@ void TextObject::setupText() {
 
 int TextObject::getLineX(int line) const {
 	int x = _x;
+	if (line >= _numberLines)
+		return 0;
 	if (_justify == CENTER)
 		x = _x - (_font->getKernedStringLength(_lines[line]) / 2);
 	else if (_justify == RJUSTIFY)




More information about the Scummvm-git-logs mailing list