mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 09:43:45 +01:00
SavedataParam: Be careful with const char* to string. Might help #13187
This commit is contained in:
1 parent
3574a352df
commit
b652f62d19
2 files changed
+6
-2
No files matched your search
@@ -263,7 +263,11 @@ std::string SavedataParam::GetSaveFilePath(const SceUtilitySavedataParam *param,
|
||||
|
||||
inline static std::string FixedToString(const char *str, size_t n)
|
||||
{
|
||||
return std::string(str, strnlen(str, n));
|
||||
if (!str) {
|
||||
return std::string("");
|
||||
} else {
|
||||
return std::string(str, strnlen(str, n));
|
||||
}
|
||||
}
|
||||
|
||||
std::string SavedataParam::GetGameName(const SceUtilitySavedataParam *param) const
|
||||
|
||||
Reference in new issue
Block a user