From 111108a119b956efdfe7776d05728d4972a6433a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=BDubom=C3=ADr=20Rem=C3=A1k?= Date: Sun, 18 Mar 2018 22:17:49 +0100 Subject: [PATCH] MUTATIONOFJB: Fix GOTO command. --- engines/mutationofjb/commands/gotocommand.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/mutationofjb/commands/gotocommand.cpp b/engines/mutationofjb/commands/gotocommand.cpp index 77c474b65375..92cce14479f9 100644 --- a/engines/mutationofjb/commands/gotocommand.cpp +++ b/engines/mutationofjb/commands/gotocommand.cpp @@ -34,11 +34,11 @@ namespace MutationOfJB { bool GotoCommandParser::parse(const Common::String &line, ScriptParseContext &parseCtx, Command *&command) { - if (line.firstChar() != '_') { + if (line.size() < 6 || !line.hasPrefix("GOTO")) { return false; } - Common::String label = line.c_str() + 1; + Common::String label = line.c_str() + 6; GotoCommand *gotoCmd = new GotoCommand(); if (parseCtx._labels.contains(label)) {