fix: strchr check

This commit is contained in:
Henry Jung 2023-02-08 07:54:08 -05:00
parent d8ee3480df
commit 0e538b0931
1 changed files with 1 additions and 1 deletions

View File

@ -374,7 +374,7 @@ namespace Database
size_t regions_num = ARRAY_SIZE(regions);
const char* found = strchr(regions_index,code);
if(found) return regions[found-regions_index];
if(found && found-regions_index < strlen(regions_index)) return regions[found-regions_index];
else return unknownAsString ? "???" : NULL;
}