mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
Add IW3 zone writing
This commit is contained in:
@ -84,13 +84,13 @@ void ZoneDefinitionOutputStream::WriteEntry(const std::string& entryKey, const s
|
||||
{
|
||||
m_stream << entryKey << ",";
|
||||
|
||||
if(entryValue.find('"') != std::string::npos
|
||||
if (entryValue.find('"') != std::string::npos
|
||||
|| entryValue.find("//") != std::string::npos)
|
||||
{
|
||||
m_stream << '"';
|
||||
for(const auto& c : entryValue)
|
||||
for (const auto& c : entryValue)
|
||||
{
|
||||
switch(c)
|
||||
switch (c)
|
||||
{
|
||||
case '"':
|
||||
m_stream << "\\\"";
|
||||
@ -107,6 +107,10 @@ void ZoneDefinitionOutputStream::WriteEntry(const std::string& entryKey, const s
|
||||
}
|
||||
m_stream << '"';
|
||||
}
|
||||
else if (entryValue.empty())
|
||||
{
|
||||
m_stream << R"("")";
|
||||
}
|
||||
else
|
||||
{
|
||||
m_stream << entryValue;
|
||||
|
Reference in New Issue
Block a user