- fixed wrong point values in loop tags parser

https://forum.zdoom.org/viewtopic.php?t=67812
This commit is contained in:
alexey.lysiuk 2020-03-13 13:26:29 +02:00
parent 4719ad44d8
commit fbb3a50e9a

View file

@ -234,26 +234,32 @@ static void ParseVorbisComments(MusicIO::FileInterface *fr, uint32_t *start, zmu
for (auto tag : loopStartTags)
{
if (!strnicmp(strdat, tag, strlen(tag)))
const size_t tagLength = strlen(tag);
if (!strnicmp(strdat, tag, tagLength))
{
S_ParseTimeTag(strdat + 11, startass, start);
S_ParseTimeTag(strdat + tagLength, startass, start);
break;
}
}
for (auto tag : loopEndTags)
{
if (!strnicmp(strdat, tag, strlen(tag)))
const size_t tagLength = strlen(tag);
if (!strnicmp(strdat, tag, tagLength))
{
S_ParseTimeTag(strdat + 11, endass, end);
S_ParseTimeTag(strdat + tagLength, endass, end);
endfound = true;
break;
}
}
for (auto tag : loopLengthTags)
{
if (!strnicmp(strdat, tag, strlen(tag)))
const size_t tagLength = strlen(tag);
if (!strnicmp(strdat, tag, tagLength))
{
S_ParseTimeTag(strdat + 11, &loopass, &looplen);
S_ParseTimeTag(strdat + tagLength, &loopass, &looplen);
*end += *start;
break;
}