diff options
author | Matthew Hoops | 2015-07-04 12:34:23 -0400 |
---|---|---|
committer | Matthew Hoops | 2015-07-04 12:35:37 -0400 |
commit | 4025c20ea474d7978eb1c7267573f344a9b8830a (patch) | |
tree | b02c3e6b6748139e568b0b1d8af13c2ce15451c4 /engines/mohawk | |
parent | 9ca62e6f619fc45b6d305ed46eea439cf78855c9 (diff) | |
download | scummvm-rg350-4025c20ea474d7978eb1c7267573f344a9b8830a.tar.gz scummvm-rg350-4025c20ea474d7978eb1c7267573f344a9b8830a.tar.bz2 scummvm-rg350-4025c20ea474d7978eb1c7267573f344a9b8830a.zip |
MOHAWK: Fix parsing the Arthur's Computer Adventure globals section
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/livingbooks_code.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/mohawk/livingbooks_code.cpp b/engines/mohawk/livingbooks_code.cpp index c9a117187c..b5ea547414 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 |