diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-02-20 23:02:47 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-02-20 23:02:47 -0300 |
commit | b62ec387f340220e11902daab8484fcb85d28cda (patch) | |
tree | fd62ea164cd1cb5a656df529f554ed8d4bf3301b /core | |
parent | f2a068984c36de1f77940ae9d5dc0d017b8e642d (diff) | |
parent | 287a6347e66e530350f09f3d66b3ef8e7e868a0b (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'core')
-rw-r--r-- | core/io/resource_format_xml.cpp | 16 | ||||
-rw-r--r-- | core/ustring.cpp | 2 |
2 files changed, 10 insertions, 8 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; diff --git a/core/ustring.cpp b/core/ustring.cpp index 336d8eea0a..b0f06c6ab6 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -2518,7 +2518,7 @@ bool String::begins_with(const char* p_string) const { } - return true; + return *p_string == 0; } |