[Scummvm-git-logs] scummvm master -> d9dcc54d4939384d3db4e82a0a19307391b5ca77

phcoder noreply at scummvm.org
Fri Mar 17 15:50:10 UTC 2023


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:
d9dcc54d49 GRIM: Fix handling of single-byte character in DBCS font


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

Commit Message:
GRIM: Fix handling of single-byte character in DBCS font

Changed paths:
    engines/grim/font.cpp


diff --git a/engines/grim/font.cpp b/engines/grim/font.cpp
index 73f51d0dda9..58733c680c5 100644
--- a/engines/grim/font.cpp
+++ b/engines/grim/font.cpp
@@ -276,7 +276,7 @@ void BitmapFont::render(Graphics::Surface &buf, const Common::String &currentLin
 
 	for (unsigned int d = 0; d < currentLine.size(); d++) {
 		uint16 ch = uint8(currentLine[d]);
-		if (_isDBCS && d + 1 < currentLine.size()) {
+		if (_isDBCS && (ch & 0x80) &&  d + 1 < currentLine.size()) {
 			ch = (ch << 8) | (currentLine[++d] & 0xff);
 		}
 		int32 charBitmapWidth = getCharBitmapWidth(ch);




More information about the Scummvm-git-logs mailing list