[Scummvm-git-logs] scummvm master -> 4edc065e88d08749c7d1cba57cc4ed4cf0069207

kelmer44 noreply at scummvm.org
Wed Oct 8 15:20:12 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:
4edc065e88 TOT: Prevent uint underflow in dialog line breaking code


Commit: 4edc065e88d08749c7d1cba57cc4ed4cf0069207
    https://github.com/scummvm/scummvm/commit/4edc065e88d08749c7d1cba57cc4ed4cf0069207
Author: kelmer (kelmer at gmail.com)
Date: 2025-10-08T17:19:59+02:00

Commit Message:
TOT: Prevent uint underflow in dialog line breaking code

Changed paths:
    engines/tot/engine.cpp


diff --git a/engines/tot/engine.cpp b/engines/tot/engine.cpp
index 4ba73c54a80..f4d3ce37542 100644
--- a/engines/tot/engine.cpp
+++ b/engines/tot/engine.cpp
@@ -3961,7 +3961,7 @@ void TotEngine::sayLine(
 					charCounter -= 1;
 				} while (text.text[charCounter] != ' ');
 				lineBreaks[lineBreakCount] = charCounter + 1;
-			} while (charCounter + 1 <= text.text.size() - width);
+			} while (charCounter + 1 <= ((int)text.text.size() - (int)width));
 
 			lineBreakCount += 1;
 			lineBreaks[lineBreakCount] = text.text.size();




More information about the Scummvm-git-logs mailing list