From 7fe1e0471506cd28645044108ae910839768c0de Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Tue, 10 Aug 1999 19:35:15 +0000 Subject: [PATCH] Fix: Strings can end with ... (note the `...'). --- kdbg/parsevar.cpp | 62 +++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/kdbg/parsevar.cpp b/kdbg/parsevar.cpp index 9e5482c..b0fe284 100644 --- a/kdbg/parsevar.cpp +++ b/kdbg/parsevar.cpp @@ -99,42 +99,40 @@ moreStrings: } // closing quote p++; - /* very long strings are followed by `...' */ - if (*p == '.' && p[1] == '.' && p[2] == '.') { - p += 3; - } - else { - /* - * Strings can consist of several parts, some of which contain - * repeated characters. - */ - if (quote == '\'') { - // look ahaead for - const char* q = p+1; - while (isspace(*q)) - q++; - if (strncmp(q, "' */ - } + /* + * Strings can consist of several parts, some of which contain repeated + * characters. + */ + if (quote == '\'') { + // look ahaead for + const char* q = p+1; + while (isspace(*q)) + q++; + if (strncmp(q, "' */ } } - // is the string continued? - if (*p == ',') { - // look ahead for another quote - const char* q = p+1; - while (isspace(*q)) - q++; - if (*q == '"' || *q == '\'') { - // yes! - p = q; - goto moreStrings; - } + } + // is the string continued? + if (*p == ',') { + // look ahead for another quote + const char* q = p+1; + while (isspace(*q)) + q++; + if (*q == '"' || *q == '\'') { + // yes! + p = q; + goto moreStrings; } } + /* very long strings are followed by `...' */ + if (*p == '.' && p[1] == '.' && p[2] == '.') { + p += 3; + } } void skipNestedWithString(const char*& s, char opening, char closing) -- 2.11.4.GIT