From 912f61c90449d99db94a7bc5cb9711eed237b7a5 Mon Sep 17 00:00:00 2001 From: Simon Delamarre Date: Sat, 29 Oct 2022 00:43:41 +0200 Subject: [PATCH] GOB: skip '\r' or '\n' bytes when printing text CRLF is sometimes found at the end of resource strings, but uselessly (the "printText" opcode has no is no "newline" capacity) Fixes garbage characters in Adibou2 diploma text. --- engines/gob/video.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 3538d4d63f4..41d33585f12 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -96,6 +96,9 @@ void Font::drawLetter(Surface &surf, uint8 c, uint16 x, uint16 y, uint16 data; + if (c == '\r' || c == '\n') + return; + const byte *src = getCharData(c); if (!src) { warning("Font::drawLetter(): getCharData() == 0");