mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-19 00:04:04 +01:00
Fix fakename streamfile for extensionless names
This commit is contained in:
parent
66d3e14fe5
commit
1a4de84b1f
@ -680,9 +680,12 @@ STREAMFILE* open_fakename_streamfile(STREAMFILE *streamfile, const char *fakenam
|
||||
}
|
||||
|
||||
if (fakeext) {
|
||||
char * ext = strrchr(this_sf->fakename,'.');
|
||||
if (ext != NULL)
|
||||
char* ext = strrchr(this_sf->fakename,'.');
|
||||
if (ext != NULL) {
|
||||
ext[1] = '\0'; /* truncate past dot */
|
||||
} else {
|
||||
strcat(this_sf->fakename, "."); /* no extension = add dot */
|
||||
}
|
||||
strcat(this_sf->fakename, fakeext);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user