mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Fix copy/paste typo causing crash getting tempdirs if an env var had no value
This commit is contained in:
parent
3b40d47313
commit
6d0315eaf9
@ -155,9 +155,9 @@ std::vector<std::string> System_GetPropertyStringVec(SystemProperty prop) {
|
||||
case SYSPROP_TEMP_DIRS:
|
||||
if (getenv("TMPDIR") && strlen(getenv("TMPDIR")) != 0)
|
||||
result.push_back(getenv("TMPDIR"));
|
||||
if (getenv("TMPDIR") && strlen(getenv("TMP")) != 0)
|
||||
if (getenv("TMP") && strlen(getenv("TMP")) != 0)
|
||||
result.push_back(getenv("TMP"));
|
||||
if (getenv("TMPDIR") && strlen(getenv("TEMP")) != 0)
|
||||
if (getenv("TEMP") && strlen(getenv("TEMP")) != 0)
|
||||
result.push_back(getenv("TEMP"));
|
||||
return result;
|
||||
|
||||
|
@ -332,9 +332,9 @@ std::vector<std::string> System_GetPropertyStringVec(SystemProperty prop) {
|
||||
case SYSPROP_TEMP_DIRS:
|
||||
if (getenv("TMPDIR") && strlen(getenv("TMPDIR")) != 0)
|
||||
result.push_back(getenv("TMPDIR"));
|
||||
if (getenv("TMPDIR") && strlen(getenv("TMP")) != 0)
|
||||
if (getenv("TMP") && strlen(getenv("TMP")) != 0)
|
||||
result.push_back(getenv("TMP"));
|
||||
if (getenv("TMPDIR") && strlen(getenv("TEMP")) != 0)
|
||||
if (getenv("TEMP") && strlen(getenv("TEMP")) != 0)
|
||||
result.push_back(getenv("TEMP"));
|
||||
return result;
|
||||
|
||||
|
@ -373,9 +373,9 @@ std::vector<std::string> System_GetPropertyStringVec(SystemProperty prop) {
|
||||
|
||||
if (getenv("TMPDIR") && strlen(getenv("TMPDIR")) != 0)
|
||||
result.push_back(getenv("TMPDIR"));
|
||||
if (getenv("TMPDIR") && strlen(getenv("TMP")) != 0)
|
||||
if (getenv("TMP") && strlen(getenv("TMP")) != 0)
|
||||
result.push_back(getenv("TMP"));
|
||||
if (getenv("TMPDIR") && strlen(getenv("TEMP")) != 0)
|
||||
if (getenv("TEMP") && strlen(getenv("TEMP")) != 0)
|
||||
result.push_back(getenv("TEMP"));
|
||||
return result;
|
||||
}
|
||||
|
@ -233,9 +233,9 @@ std::vector<std::string> System_GetPropertyStringVec(SystemProperty prop) {
|
||||
|
||||
if (getenv("TMPDIR") && strlen(getenv("TMPDIR")) != 0)
|
||||
result.push_back(getenv("TMPDIR"));
|
||||
if (getenv("TMPDIR") && strlen(getenv("TMP")) != 0)
|
||||
if (getenv("TMP") && strlen(getenv("TMP")) != 0)
|
||||
result.push_back(getenv("TMP"));
|
||||
if (getenv("TMPDIR") && strlen(getenv("TEMP")) != 0)
|
||||
if (getenv("TEMP") && strlen(getenv("TEMP")) != 0)
|
||||
result.push_back(getenv("TEMP"));
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user