[Scummvm-git-logs] scummvm master -> 7f7e5ea6bc57b74a21e570ef31e7e8b75e512235

djsrv dservilla at gmail.com
Sat Aug 1 16:05:57 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7f7e5ea6bc DIRECTOR: LINGO: Keep 'comments' within strings


Commit: 7f7e5ea6bc57b74a21e570ef31e7e8b75e512235
    https://github.com/scummvm/scummvm/commit/7f7e5ea6bc57b74a21e570ef31e7e8b75e512235
Author: djsrv (dservilla at gmail.com)
Date: 2020-08-01T12:00:08-04:00

Commit Message:
DIRECTOR: LINGO: Keep 'comments' within strings

Changed paths:
    engines/director/lingo/lingo-preprocessor.cpp


diff --git a/engines/director/lingo/lingo-preprocessor.cpp b/engines/director/lingo/lingo-preprocessor.cpp
index 94b49c8782..0bf75f83e8 100644
--- a/engines/director/lingo/lingo-preprocessor.cpp
+++ b/engines/director/lingo/lingo-preprocessor.cpp
@@ -149,8 +149,12 @@ Common::String Lingo::codePreprocessor(const char *s, LingoArchive *archive, Scr
 	s = tmp.c_str();
 
 	// Strip comments
+	bool inString = false;
 	while (*s) {
-		if (*s == '-' && *(s + 1) == '-') { // At the end of the line we will have \0
+		if (*s == '"')
+			inString = !inString;
+
+		if (!inString && *s == '-' && *(s + 1) == '-') { // At the end of the line we will have \0
 			while (*s && *s != '\n')
 				s++;
 		}




More information about the Scummvm-git-logs mailing list