This commit is contained in:
IAGOnGithub 2026-04-20 06:02:10 +03:00 committed by GitHub
commit 2cc0b62a41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -233,10 +233,10 @@ void MakeBlockEvent(Event& event, EventType type)
std::string ReadEventText()
{
char buffer[2];
char buffer[9];
std::uint32_t length = ReadVLQ();
if (length <= 2)
if (length <= 9)
{
if (fread(buffer, length, 1, g_inputFile) != 1)
RaiseError("failed to read event text");
@ -284,11 +284,11 @@ bool ReadSeqEvent(Event& event)
// text event
std::string text = ReadEventText();
if (text == "[")
if (text == "[" || text == "loopStart")
MakeBlockEvent(event, EventType::LoopBegin);
else if (text == "][")
MakeBlockEvent(event, EventType::LoopEndBegin);
else if (text == "]")
else if (text == "]" || text == "loopEnd")
MakeBlockEvent(event, EventType::LoopEnd);
else if (text == ":")
MakeBlockEvent(event, EventType::Label);