diff options
author | volzhs <volzhs@gmail.com> | 2017-01-17 03:20:33 +0900 |
---|---|---|
committer | volzhs <volzhs@gmail.com> | 2017-01-17 03:50:42 +0900 |
commit | 57350faee40bba50878658d87e0c875ed3e92571 (patch) | |
tree | b9af21a676b2078fa798b877935b5dc3067582bd /core | |
parent | 6a3dae5be944d9e226cca7bf0bd80fb0036e8324 (diff) |
Fix crash when creating new project
Diffstat (limited to 'core')
-rw-r--r-- | core/ustring.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 71934b2955..478c427fb9 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3898,10 +3898,9 @@ String String::get_extension() const { String String::plus_file(const String& p_file) const { if (empty()) return p_file; - if (operator [](length()-1)=='/' || p_file.operator [](0)=='/') + if (operator [](length()-1)=='/' || (p_file.size()>0 && p_file.operator [](0)=='/')) return *this+p_file; - else - return *this+"/"+p_file; + return *this+"/"+p_file; } String String::percent_encode() const { |