diff options
-rw-r--r-- | engines/agi/agi.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 4bebf97e95..3a79f02cb6 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -362,9 +362,15 @@ int AgiEngine::agiInit() { initPriTable(); - // clear string buffer - for (i = 0; i < MAX_STRINGS; i++) - _game.strings[i][0] = 0; + // Clear the string buffer on startup, but not when the game restarts, as + // some scripts expect that the game strings remain unaffected after a + // restart. An example is script 98 in SQ2, which is not invoked on restart + // to ask Ego's name again. The name is supposed to be maintained in string 1. + // Fixes bug #3292784. + if (!_restartGame) { + for (i = 0; i < MAX_STRINGS; i++) + _game.strings[i][0] = 0; + } // setup emulation |