From 4025c20ea474d7978eb1c7267573f344a9b8830a Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 4 Jul 2015 12:34:23 -0400 Subject: [PATCH] MOHAWK: Fix parsing the Arthur's Computer Adventure globals section --- engines/mohawk/livingbooks_code.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engines/mohawk/livingbooks_code.cpp b/engines/mohawk/livingbooks_code.cpp index c9a117187c3..b5ea5474143 100644 --- a/engines/mohawk/livingbooks_code.cpp +++ b/engines/mohawk/livingbooks_code.cpp @@ -1746,6 +1746,10 @@ uint LBCode::parseCode(const Common::String &source) { if (token != ' ' && token != '(' && wasFunction) error("while parsing script '%s', encountered incomplete function call", source.c_str()); + // Skip C++-style comments + if (token == '/' && lookahead == '/') + break; + // First, we check for simple operators. for (uint i = 0; i < NUM_LB_OPERATORS; i++) { if (token != operators[i].token) @@ -1776,6 +1780,7 @@ uint LBCode::parseCode(const Common::String &source) { switch (token) { // whitespace case ' ': + case '\t': // ignore break; // literal string