SavedataParam: Be careful with const char* to string. Might help #13187

This commit is contained in:
Henrik Rydgård
2020-08-26 22:17:42 +02:00
parent 3574a352df
commit b652f62d19
2 changed files with 6 additions and 2 deletions

View File

@@ -155,7 +155,7 @@ int ParamSFOData::GetDataOffset(const u8 *paramsfo, std::string dataName) {
for (u32 i = 0; i < header->index_table_entries; i++)
{
const char *key = (const char *)(key_start + indexTables[i].key_table_offset);
if(std::string(key) == dataName)
if (!strcmp(key, dataName.c_str()))
{
return data_start + indexTables[i].data_table_offset;
}