diff options
author | okamstudio <juan@okamstudio.com> | 2014-02-20 23:39:56 -0200 |
---|---|---|
committer | okamstudio <juan@okamstudio.com> | 2014-02-20 23:39:56 -0200 |
commit | 70a9647d2dc7b218e3dc4e9607aa5ffc0e6e1aa3 (patch) | |
tree | 11ee6c9bb2c6e162bc71a6659a028c5e5112b8be | |
parent | 44abe6bfd79164386853a7f02bb0d43148fcfc58 (diff) | |
parent | b6583909a9783dd5fc9595ba56f5d9f7557898b0 (diff) | |
download | redot-engine-70a9647d2dc7b218e3dc4e9607aa5ffc0e6e1aa3.tar.gz |
Merge pull request #123 from Terseus/fix-113_editor-settings-xml-corruption
Fix #113 editor_settings.xml corruption
-rw-r--r-- | core/io/resource_format_xml.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp index f175c73e98..20a42f25df 100644 --- a/core/io/resource_format_xml.cpp +++ b/core/io/resource_format_xml.cpp @@ -97,16 +97,17 @@ ResourceInteractiveLoaderXML::Tag* ResourceInteractiveLoaderXML::parse_tag(bool if (!complete) { String name; - String value; + CharString r_value; bool reading_value=false; while(!f->eof_reached()) { CharType c=get_char(); if (c=='>') { - if (value.length()) { + if (r_value.size()) { - tag.args[name]=value; + r_value.push_back(0); + tag.args[name].parse_utf8(r_value.get_data()); } break; @@ -115,17 +116,18 @@ ResourceInteractiveLoaderXML::Tag* ResourceInteractiveLoaderXML::parse_tag(bool if (!reading_value && name.length()) { reading_value=true; - } else if (reading_value && value.length()) { + } else if (reading_value && r_value.size()) { - tag.args[name]=value; + r_value.push_back(0); + tag.args[name].parse_utf8(r_value.get_data()); name=""; - value=""; + r_value.clear(); reading_value=false; } } else if (reading_value) { - value+=c; + r_value.push_back(c); } else { name+=c; |