[Scummvm-git-logs] scummvm master -> 159fda4bff8f20769339c0f5f53796a53a5f73de

whoozle noreply at scummvm.org
Fri Jul 17 09:53:43 UTC 2026


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:
159fda4bff PHOENIXVR: Right-strip strings before parsing


Commit: 159fda4bff8f20769339c0f5f53796a53a5f73de
    https://github.com/scummvm/scummvm/commit/159fda4bff8f20769339c0f5f53796a53a5f73de
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-07-17T10:51:33+01:00

Commit Message:
PHOENIXVR: Right-strip strings before parsing

Script parser skips whitespaces already, fix CR handling by right-stripping whitespaces.

Changed paths:
    engines/phoenixvr/script.cpp


diff --git a/engines/phoenixvr/script.cpp b/engines/phoenixvr/script.cpp
index 4986cb7992b..8c5412faf06 100644
--- a/engines/phoenixvr/script.cpp
+++ b/engines/phoenixvr/script.cpp
@@ -339,10 +339,10 @@ Script::Script(Common::SeekableReadStream &s) {
 	while (lineStartOffset < textSize) {
 		auto lineStart = text.begin() + lineStartOffset;
 		auto lineEnd = Common::find(lineStart, text.end(), '\n');
-		parseLine({lineStart, lineEnd}, lineno++);
 		lineStartOffset += Common::distance(lineStart, lineEnd) + 1;
-		if (lineStartOffset < textSize && text[lineStartOffset] == '\r')
-			++lineStartOffset;
+		while (lineEnd > lineStart && Common::isSpace(lineEnd[-1]))
+			--lineEnd;
+		parseLine({lineStart, lineEnd}, lineno++);
 	}
 }
 




More information about the Scummvm-git-logs mailing list