From b4a2215711069edca89bb523350fffce05a76991 Mon Sep 17 00:00:00 2001 From: Indev Date: Tue, 18 Nov 2025 12:20:27 +0300 Subject: [PATCH] Emotes: only print 'too many frames' warning if we actually get non-empty frame --- src/m_emotes.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/m_emotes.cpp b/src/m_emotes.cpp index 12886cc5a..9981ace8d 100644 --- a/src/m_emotes.cpp +++ b/src/m_emotes.cpp @@ -106,12 +106,6 @@ void M_LoadEmotes(UINT16 wadnum) UINT8 numframes = 0; auto copy_frame = [&] { - if (numframes == MAXEMOTEFRAMES) - { - CONS_Alert(CONS_WARNING, "EMOTES: Too many frames. (file %s, line %d)", wadfiles[wadnum]->filename, linenum); - return false; - } - size_t list_split = value.find(','); std::string framelumpname = value.substr(0, list_split); trim(framelumpname); @@ -125,6 +119,13 @@ void M_LoadEmotes(UINT16 wadnum) if (framelumpname.size() == 0) return false; + // Only print this warning if we actually got new frame + if (numframes == MAXEMOTEFRAMES) + { + CONS_Alert(CONS_WARNING, "EMOTES: Too many frames. (file %s, line %d)\n", wadfiles[wadnum]->filename, linenum); + return false; + } + if (framelumpname.size() > 8) { CONS_Alert(CONS_WARNING, "EMOTES: Frame %d name is too long. (file %s, line %d)", numframes, wadfiles[wadnum]->filename, linenum);