Browse Source

Projucer: Fix quote escaping in CodeBlocks exporter

tags/2021-05-28
reuk 5 years ago
parent
commit
c213796951
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h

+ 4
- 2
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h View File

@@ -350,12 +350,14 @@ private:
auto keys = defines.getAllKeys();
auto values = defines.getAllValues();
const auto escapedQuote = isWindows() ? "\\\"" : "\\\\\"";
for (int i = 0; i < defines.size(); ++i)
{
auto result = keys[i];
if (values[i].isNotEmpty())
result += "=" + values[i];
result += "=\"" + values[i].replace ("\"", escapedQuote) + "\"";
defs.add (result);
}
@@ -569,7 +571,7 @@ private:
for (auto& def : getDefines (config, target))
{
if (! def.containsChar ('='))
def << '=';
def << '=';
flags.add ("-D" + def);
}


Loading…
Cancel
Save