[Scummvm-git-logs] scummvm master -> 007d94963b8f1d8656a175a18c2cac91dc0a4b9f
sev-
noreply at scummvm.org
Sat Feb 4 13:33:41 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
007d94963b DIRECTOR: Truly fix repl in debugger
Commit: 007d94963b8f1d8656a175a18c2cac91dc0a4b9f
https://github.com/scummvm/scummvm/commit/007d94963b8f1d8656a175a18c2cac91dc0a4b9f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-04T14:33:32+01:00
Commit Message:
DIRECTOR: Truly fix repl in debugger
Changed paths:
engines/director/debugger.cpp
diff --git a/engines/director/debugger.cpp b/engines/director/debugger.cpp
index 78d34eec517..c7d5ba20b29 100644
--- a/engines/director/debugger.cpp
+++ b/engines/director/debugger.cpp
@@ -871,7 +871,11 @@ bool Debugger::lingoCommandProcessor(const char *inputOrig) {
_lingoReplMode = false;
return true;
}
- return lingoEval(inputOrig);
+ bool ret = lingoEval(inputOrig);
+
+ debugPrintf(PROMPT);
+
+ return ret;
}
bool Debugger::lingoEval(const char *inputOrig) {
@@ -879,9 +883,9 @@ bool Debugger::lingoEval(const char *inputOrig) {
inputSan.trim();
if (inputSan.empty())
return true;
- Common::String expr = Common::String::format("return %s", inputSan.c_str());
+
// Compile the code to an anonymous function and call it
- ScriptContext *sc = g_lingo->_compiler->compileAnonymous(expr);
+ ScriptContext *sc = g_lingo->_compiler->compileAnonymous(inputSan);
if (!sc) {
debugPrintf("Failed to parse expression!\n%s", _lingoReplMode ? PROMPT : "");
return true;
@@ -889,9 +893,10 @@ bool Debugger::lingoEval(const char *inputOrig) {
Symbol sym = sc->_eventHandlers[kEventGeneric];
_lingoEval = true;
LC::call(sym, 0, true);
- _finish = true;
- _finishCounter = 1;
- return cmdExit(0, nullptr);
+ g_lingo->execute();
+
+ debugPrintf("\n");
+ return true;
}
void Debugger::stepHook() {
More information about the Scummvm-git-logs
mailing list