Skip to content

Commit 1cd295b

Browse files
committed
Skip comments for multi-line check
1 parent 2ffa9ef commit 1cd295b

1 file changed

Lines changed: 16 additions & 14 deletions

File tree

Common/src/CConfig.cpp

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2857,20 +2857,22 @@ void CConfig::SetConfig_Parsing(char case_filename[MAX_STRING_SIZE]) {
28572857
* If there is a statement after a cont. char
28582858
* throw an error. ---*/
28592859

2860-
while (text_line.back() == '\\' ||
2861-
(PrintingToolbox::split(text_line, '\\').size() > 1)){
2862-
string tmp;
2863-
getline (config_buffer, tmp);
2864-
line_count++;
2865-
if (tmp.find_first_of('=') != string::npos){
2866-
errorString.append("Line " + to_string(line_count) + ": Statement found after continuation character.\n");
2867-
}
2868-
PrintingToolbox::trim(tmp);
2869-
if (tmp.front() != '%'){
2870-
text_line = PrintingToolbox::split(text_line, '\\')[0];
2871-
text_line += " " + tmp;
2872-
}
2873-
}
2860+
if (text_line.front() != '%'){
2861+
while (text_line.back() == '\\' ||
2862+
(PrintingToolbox::split(text_line, '\\').size() > 1)){
2863+
string tmp;
2864+
getline (config_buffer, tmp);
2865+
line_count++;
2866+
if (tmp.find_first_of('=') != string::npos){
2867+
errorString.append("Line " + to_string(line_count) + ": Statement found after continuation character.\n");
2868+
}
2869+
PrintingToolbox::trim(tmp);
2870+
if (tmp.front() != '%'){
2871+
text_line = PrintingToolbox::split(text_line, '\\')[0];
2872+
text_line += " " + tmp;
2873+
}
2874+
}
2875+
}
28742876

28752877
if (TokenizeString(text_line, option_name, option_value)) {
28762878

0 commit comments

Comments
 (0)