Skip to content

Commit

Permalink
Bug fix in UTF-8 fixup code - did not handle IAC IAC properly
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed May 28, 2014
1 parent fd445a7 commit 99a11ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc.cpp
Expand Up @@ -2118,7 +2118,7 @@ CString strLine (lpszText, size);

// do not display UTF-8 characters until they have completely arrived
// check if high-order bit is set
if (m_bUTF_8 && (c & 0x80) && c != IAC)
if (!(flags & NOTE_OR_COMMAND) && m_bUTF_8 && (c & 0x80) && (c != IAC || m_phase == HAVE_IAC))
{
m_UTF8Sequence [0] = c;
m_UTF8Sequence [1] = 0; // null terminator
Expand Down

0 comments on commit 99a11ac

Please sign in to comment.