[Scummvm-git-logs] scummvm master -> 0648aa15eb6e0580a2ef155e465dfde873a5e2cb

fracturehill noreply at scummvm.org
Wed Aug 6 20:31:14 UTC 2025


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

Summary:
0648aa15eb NANCY: Don't pop from empty newlineTokens list


Commit: 0648aa15eb6e0580a2ef155e465dfde873a5e2cb
    https://github.com/scummvm/scummvm/commit/0648aa15eb6e0580a2ef155e465dfde873a5e2cb
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-08-06T22:31:11+02:00

Commit Message:
NANCY: Don't pop from empty newlineTokens list

Fixes assertion fail for Nancy Drew 2 when calling Dwayne Powers (late into the game)

This bug was reported here: https://bugs.scummvm.org/ticket/16112

Changed paths:
    engines/nancy/misc/hypertext.cpp


diff --git a/engines/nancy/misc/hypertext.cpp b/engines/nancy/misc/hypertext.cpp
index 48223c087f6..7f1c8daf24c 100644
--- a/engines/nancy/misc/hypertext.cpp
+++ b/engines/nancy/misc/hypertext.cpp
@@ -243,8 +243,13 @@ void HypertextParser::drawAllText(const Common::Rect &textBounds, uint leftOffse
 			Common::String &line = wrappedLines[lineNumber];
 			horizontalOffset = 0;
 			newLineStart = false;
+
 			// Draw images
-			if (newlineTokens.front() <= totalCharsDrawn) {
+			if (newlineTokens.empty()) {
+				warning("HypertextParser::drawAllText():: newlineTokens list was empty at line %u out of %u wrapped lines", lineNumber+1, wrappedLines.size());
+			}
+
+			if (!newlineTokens.empty() && newlineTokens.front() <= totalCharsDrawn) {
 				newlineTokens.pop();
 				newLineStart = true;
 




More information about the Scummvm-git-logs mailing list