mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-11-29 18:59:14 +08:00
fix Assets::getString replace \n to 0x0d
This commit is contained in:
parent
6c4ad6dc34
commit
81700df12f
@ -309,8 +309,11 @@ const std::string& Assets::getString(const std::string& resid,const std::string&
|
||||
parseResource(resid,&name,&pkg);
|
||||
name = AttributeSet::normalize(pkg,resid);
|
||||
auto itr = mStrings.find(name);
|
||||
if(itr != mStrings.end()/* && ! itr->second.empty()*/) {
|
||||
return itr->second;
|
||||
if(itr != mStrings.end()) {
|
||||
std::string str=itr->second;
|
||||
TextUtils::replace("\\n","\n");
|
||||
TextUtils::replace("\\r","\r");
|
||||
return str;
|
||||
}
|
||||
return resid;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user