mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 14:50:17 +00:00
AD: Fix crash when fanmade game has only one word
This commit is contained in:
parent
df3c64a9ef
commit
cc2db8211a
@ -91,10 +91,13 @@ static Common::String sanitizeName(const char *name, int maxLen) {
|
||||
maxLen -= word.size();
|
||||
}
|
||||
word.clear();
|
||||
|
||||
if (!*name)
|
||||
break;
|
||||
}
|
||||
if (*name)
|
||||
name++;
|
||||
} while (*name && maxLen > 0);
|
||||
} while (maxLen > 0);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user