mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Couple of minor things, crashfix on deserialization failure
This commit is contained in:
parent
76e8e89925
commit
c6c5a93bf4
3 changed files with 4 additions and 3 deletions
|
@ -301,7 +301,7 @@ bool Path::IsAbsolute() const {
|
|||
return false;
|
||||
}
|
||||
|
||||
std::string Path::PathTo(const Path &other) {
|
||||
std::string Path::PathTo(const Path &other) const {
|
||||
if (!other.StartsWith(*this)) {
|
||||
// Can't do this. Should return an error.
|
||||
return std::string();
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
// For Android directory trees, navigates to the root of the tree.
|
||||
Path GetRootVolume() const;
|
||||
|
||||
std::string PathTo(const Path &child);
|
||||
std::string PathTo(const Path &child) const;
|
||||
|
||||
bool operator ==(const Path &other) const {
|
||||
return path_ == other.path_ && type_ == other.type_;
|
||||
|
|
|
@ -143,7 +143,8 @@ public:
|
|||
if (p.error != p.ERROR_FAILURE) {
|
||||
return ERROR_NONE;
|
||||
} else {
|
||||
*errorString = std::string("Failure at ") + p.GetBadSectionTitle();
|
||||
std::string badSectionTitle = p.GetBadSectionTitle() ? p.GetBadSectionTitle() : "(unknown bad section)";
|
||||
*errorString = std::string("Failure at ") + badSectionTitle;
|
||||
return ERROR_BROKEN_STATE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue