[Scummvm-git-logs] scummvm master -> 6588eafb0d7bc3d42fd852320e78fdd31da33872

whoozle noreply at scummvm.org
Thu Jul 16 22:18:14 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:
6588eafb0d PHOENIXVR: Allow spaces in plugin arguments


Commit: 6588eafb0d7bc3d42fd852320e78fdd31da33872
    https://github.com/scummvm/scummvm/commit/6588eafb0d7bc3d42fd852320e78fdd31da33872
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-07-16T23:17:46+01:00

Commit Message:
PHOENIXVR: Allow spaces in plugin arguments

Fix game breaking bug in Chapter 5 of Amerzone where animation name has spaces,
Play_AnimBlock incorrectly parse it as an extra argument and until <var> freezed forever.

Changed paths:
    engines/phoenixvr/commands.h
    engines/phoenixvr/script.cpp


diff --git a/engines/phoenixvr/commands.h b/engines/phoenixvr/commands.h
index d3a33cb16f6..6e21fff5973 100644
--- a/engines/phoenixvr/commands.h
+++ b/engines/phoenixvr/commands.h
@@ -535,7 +535,7 @@ struct Play_AnimBloc : public Script::Command {
 
 	Play_AnimBloc(const Common::Array<Common::String> &args) : name(args[0]), dstVar(args[1]), dstVarValue(atoi(args[2].c_str())), speed(args.size() >= 4 ? atof(args[3].c_str()) : 25) {}
 	void exec(Script::ExecutionContext &ctx) const override {
-		debug("Play_AnimBloc %s %s %d, %g", name.c_str(), dstVar.c_str(), dstVarValue, speed);
+		debug("Play_AnimBloc %s %s %d %g", name.c_str(), dstVar.c_str(), dstVarValue, speed);
 		g_engine->playAnimation(name, dstVar, dstVarValue, speed);
 	}
 };
diff --git a/engines/phoenixvr/script.cpp b/engines/phoenixvr/script.cpp
index e19ce21e5c2..4986cb7992b 100644
--- a/engines/phoenixvr/script.cpp
+++ b/engines/phoenixvr/script.cpp
@@ -93,9 +93,11 @@ public:
 	Common::String nextArg() {
 		skip();
 		auto begin = _pos;
-		while (_pos < _line.size() && !Common::isSpace(_line[_pos]) && _line[_pos] != ',' && _line[_pos] != ')')
+		while (_pos < _line.size() && _line[_pos] != ',' && _line[_pos] != ')')
 			++_pos;
 		auto end = _pos;
+		while (end > begin && Common::isSpace(_line[end - 1]))
+			--end;
 		skip();
 		return _line.substr(begin, end - begin);
 	}
@@ -146,8 +148,8 @@ public:
 			else {
 				list.push_back(nextArg());
 			}
-			if (peek() == ',')
-				next();
+			if (!atEnd() && peek() != ')')
+				expect(',');
 		}
 		return list;
 	}




More information about the Scummvm-git-logs mailing list