mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 13:34:53 +00:00
[WINMM] Revert "Handle playing of files containing a '+' as part of the filename."
Wine commit: cc5f2b2c766bbe4975d7ee4a7c3b269650cbf874 author: Alexander Puzankov <alxpnv@gmail.com> Mon, 29 Nov 2010 18:15:16 +0000 (21:15 +0300) committer: Alexandre Julliard <julliard@winehq.org> Wed, 1 Dec 2010 16:16:20 +0000 (17:16 +0100)
This commit is contained in:
parent
09dde2cff9
commit
d27e2b0b23
|
@ -369,39 +369,40 @@ static FOURCC MMIO_ParseExtA(LPCSTR szFileName)
|
||||||
LPSTR extEnd;
|
LPSTR extEnd;
|
||||||
LPSTR extStart;
|
LPSTR extStart;
|
||||||
|
|
||||||
|
CHAR ext[5];
|
||||||
|
|
||||||
TRACE("(%s)\n", debugstr_a(szFileName));
|
TRACE("(%s)\n", debugstr_a(szFileName));
|
||||||
|
|
||||||
if (!szFileName)
|
if (!szFileName)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* Find the last '.' */
|
/* Find the last '+' */
|
||||||
extStart = strrchr(szFileName,'.');
|
extEnd = strrchr(szFileName,'+');
|
||||||
|
|
||||||
if (!extStart) {
|
if (!extEnd) {
|
||||||
ERR("No . in szFileName: %s\n", debugstr_a(szFileName));
|
/* No + so just an extension */
|
||||||
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
CHAR ext[5];
|
/* Find the first '.' before '+' */
|
||||||
|
extStart = extEnd - 1;
|
||||||
/* Find the '+' afterwards */
|
while (*extStart != '.') {
|
||||||
extEnd = strchr(extStart,'+');
|
if (extStart == szFileName) {
|
||||||
if (extEnd) {
|
ERR("No extension in szFileName: %s\n", debugstr_a(szFileName));
|
||||||
|
return ret;
|
||||||
if (extEnd - extStart - 1 > 4)
|
|
||||||
WARN("Extension length > 4\n");
|
|
||||||
lstrcpynA(ext, extStart + 1, min(extEnd-extStart,5));
|
|
||||||
|
|
||||||
} else {
|
|
||||||
/* No + so just an extension */
|
|
||||||
if (strlen(extStart) > 4) {
|
|
||||||
WARN("Extension length > 4\n");
|
|
||||||
}
|
}
|
||||||
lstrcpynA(ext, extStart + 1, 5);
|
extStart--;
|
||||||
}
|
}
|
||||||
TRACE("Got extension: %s\n", debugstr_a(ext));
|
|
||||||
|
|
||||||
/* FOURCC codes identifying file-extensions must be uppercase */
|
|
||||||
ret = mmioStringToFOURCCA(ext, MMIO_TOUPPER);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (extEnd - extStart - 1 > 4)
|
||||||
|
WARN("Extension length > 4\n");
|
||||||
|
lstrcpynA(ext, extStart + 1, min(extEnd-extStart,5));
|
||||||
|
|
||||||
|
TRACE("Got extension: %s\n", debugstr_a(ext));
|
||||||
|
|
||||||
|
/* FOURCC codes identifying file-extensions must be uppercase */
|
||||||
|
ret = mmioStringToFOURCCA(ext, MMIO_TOUPPER);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue