mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[util] Support encapsulated strings in configuration files
Fixes #1567.
This commit is contained in:
parent
6e5e50c359
commit
7f03f45301
@ -395,9 +395,19 @@ namespace dxvk {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Extract the value
|
// Extract the value
|
||||||
|
bool insideString = false;
|
||||||
n = skipWhitespace(line, n + 1);
|
n = skipWhitespace(line, n + 1);
|
||||||
while (n < line.size() && !isWhitespace(line[n]))
|
|
||||||
value << line[n++];
|
while (n < line.size()) {
|
||||||
|
if (!insideString && isWhitespace(line[n]))
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (line[n] == '"') {
|
||||||
|
insideString = !insideString;
|
||||||
|
n++;
|
||||||
|
} else
|
||||||
|
value << line[n++];
|
||||||
|
}
|
||||||
|
|
||||||
if (ctx.active)
|
if (ctx.active)
|
||||||
config.setOption(key.str(), value.str());
|
config.setOption(key.str(), value.str());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user