diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/bind/core_bind.cpp | 2 | ||||
-rw-r--r-- | core/ustring.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index c68222c767..88e31c56fe 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1743,11 +1743,13 @@ Error _Directory::rename(String p_from, String p_to) { ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use."); if (!p_from.is_rel_path()) { DirAccess *d = DirAccess::create_for_path(p_from); + ERR_FAIL_COND_V_MSG(!d->file_exists(p_from), ERR_DOES_NOT_EXIST, "File does not exist."); Error err = d->rename(p_from, p_to); memdelete(d); return err; } + ERR_FAIL_COND_V_MSG(!d->file_exists(p_from), ERR_DOES_NOT_EXIST, "File does not exist."); return d->rename(p_from, p_to); } diff --git a/core/ustring.cpp b/core/ustring.cpp index 18603f37eb..e382ef3746 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -792,8 +792,8 @@ signed char String::naturalnocasecmp_to(const String &p_str) const { } // Keep ptrs to start of numerical sequences - const CharType *this_substr = this_str; - const CharType *that_substr = that_str; + const char32_t *this_substr = this_str; + const char32_t *that_substr = that_str; // Compare lengths of both numerical sequences, ignoring leading zeros while (IS_DIGIT(*this_str)) { |