diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-01-16 20:10:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-16 20:10:34 +0100 |
commit | d13f2f9e25e380496e706b59720cd85eed299ca2 (patch) | |
tree | 5c202717369d8a567fecaf33099c9bb60fd57bce | |
parent | 3000c2d967dd4162aa4b60aa1182b41a4566c860 (diff) | |
parent | 57350faee40bba50878658d87e0c875ed3e92571 (diff) |
Merge pull request #7560 from volzhs/issue-7555
Fix crash when creating new project
-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 { |