GRIM: Silence sanitizer warning

This commit is contained in:
Paweł Kołodziejski 2022-01-05 15:54:36 +01:00
parent b4e6fa8078
commit 4246b97582

View File

@ -107,11 +107,7 @@ Localizer::Localizer() {
char *nextline = data;
Common::String last_entry;
//Read file till end
for (char *line = data + 4; line - data <= filesize; line = nextline + 1) {
if (line == nullptr || nextline == nullptr) {
break;
}
for (char *line = data + 4; nextline != nullptr && (line - data <= filesize); nextline != nullptr && (line = nextline + 1)) {
nextline = strchr(line, '\n');
//if there is no next line we arrived the last one
if (nextline == nullptr) {