Skip to content

Commit

Permalink
Fix trying to read from an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
dpjudas committed Jul 6, 2024
1 parent 743574e commit 69193b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SurrealEngine/Package/PackageManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ std::string PackageManager::Localize(NameString packageName, const NameString& s
}

std::string value = intFile->GetValue(sectionName, keyName);
if (*value.begin() == '"' && *(value.end() - 1) == '"')
if (!value.empty() && value.front() == '"' && value.back() == '"')
{
value.erase(value.begin());
value.erase(value.end()-1);
Expand Down

0 comments on commit 69193b7

Please sign in to comment.