core, libretro fixes for chd support

This commit is contained in:
kub 2021-03-10 23:07:25 +01:00
parent 3d1e252313
commit 886ce067c3
6 changed files with 13 additions and 7 deletions

View file

@ -83,7 +83,7 @@ static int get_ext(const char *fname, char ext[4],
strncpy(ext, fname + pos + 1, 4/*sizeof(ext)*/-1);
ext[4/*sizeof(ext)*/-1] = '\0';
if (base != NULL) {
if (base != NULL && base_size > 0) {
if (pos + 1 < base_size)
pos = base_size - 1;

@ -1 +1 @@
Subproject commit 208212ae77f5c4fedca11d797e50cb1954b2c837
Subproject commit 714fc3f268ebddf035a76cc883bd4543b5142a6f