Browse Source

Parse UTF-8 when getting path from resource UID

Haoyu Qiu 3 years ago
parent
commit
b024d16bc1
1 changed files with 1 additions and 2 deletions
  1. 1 2
      core/io/resource_uid.cpp

+ 1 - 2
core/io/resource_uid.cpp

@@ -126,8 +126,7 @@ String ResourceUID::get_id_path(ID p_id) const {
 	MutexLock l(mutex);
 	MutexLock l(mutex);
 	ERR_FAIL_COND_V(!unique_ids.has(p_id), String());
 	ERR_FAIL_COND_V(!unique_ids.has(p_id), String());
 	const CharString &cs = unique_ids[p_id].cs;
 	const CharString &cs = unique_ids[p_id].cs;
-	String s(cs.ptr());
-	return s;
+	return String::utf8(cs.ptr());
 }
 }
 void ResourceUID::remove_id(ID p_id) {
 void ResourceUID::remove_id(ID p_id) {
 	MutexLock l(mutex);
 	MutexLock l(mutex);