Skip to content

Commit

Permalink
* Fix an assertion error regarding MessageList::EditMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
iProgramMC committed May 30, 2024
1 parent c8ba737 commit e7d60fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/windows/MessageList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4087,7 +4087,7 @@ void MessageList::EditMessage(const Message& newMsg)
bool canInsert = false;
bool firstTime = true;
auto insertIter = m_messages.end();
for (; firstTime || insertIter != m_messages.end(); ++insertIter)
while (firstTime || insertIter != m_messages.end())
{
Snowflake thisSF = 0, nextSF = UINT64_MAX;

Expand Down Expand Up @@ -4115,6 +4115,8 @@ void MessageList::EditMessage(const Message& newMsg)

if (firstTime)
insertIter = m_messages.begin();
else
++insertIter;

firstTime = false;
}
Expand Down

0 comments on commit e7d60fa

Please sign in to comment.