mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-28 04:34:50 +00:00
ZVISION: Properly skip commented out puzzle criteria - fixes bug #6776
In the Zork: Nemesis version bundled in the ZGI SE DVD, the bell rope puzzle has been modified so that it's non-interactive, i.e. there isn't a hotspot to click while the video is playing, and the player is transported to the next room. In the patched script, all criteria of that puzzle were commented out, resulting in an invalid criteria list. Skip any commented out criteria, to avoid ending with an invalid list.
This commit is contained in:
parent
5f9858844a
commit
750d72812b
@ -104,6 +104,13 @@ bool ScriptManager::parseCriteria(Common::SeekableReadStream &stream, Common::Li
|
||||
Common::String line = stream.readLine();
|
||||
trimCommentsAndWhiteSpace(&line);
|
||||
|
||||
// Skip any commented out criteria. If all the criteria are commented out,
|
||||
// we might end up with an invalid criteria list (bug #6776).
|
||||
while (line.empty()) {
|
||||
line = stream.readLine();
|
||||
trimCommentsAndWhiteSpace(&line);
|
||||
}
|
||||
|
||||
// Criteria can be empty
|
||||
if (line.contains('}')) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user