Skip to content

Commit 055c478

Browse files
committed
fix #14306
1 parent c4f3c98 commit 055c478

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

lib/importproject.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,17 +266,25 @@ void ImportProject::fsParseCommand(FileSettings& fs, const std::string& command,
266266
pos++;
267267
if (pos >= command.size())
268268
break;
269+
bool wholeArgQuoted = false;
270+
if (command[pos] == '"') {
271+
wholeArgQuoted = true;
272+
pos++;
273+
}
269274
if (command[pos] != '/' && command[pos] != '-')
270275
continue;
271276
pos++;
272277
if (pos >= command.size())
273278
break;
274279
const char F = command[pos++];
275280
if (std::strchr("DUI", F)) {
276-
while (pos < command.size() && command[pos] == ' ')
281+
while (pos < command.size() && command[pos] == ' ') {
277282
++pos;
283+
wholeArgQuoted = false;
284+
}
278285
}
279-
std::string fval = readUntil(command, &pos, " =");
286+
const char *readUntilChars = wholeArgQuoted ? " =\"" : " =";
287+
std::string fval = readUntil(command, &pos, readUntilChars);
280288
if (F=='D') {
281289
std::string defval = readUntil(command, &pos, " ");
282290
defs += fval;

0 commit comments

Comments
 (0)