Skip to content

Commit

Permalink
Fix a ReadConsoleOutputCharacter regression
Browse files Browse the repository at this point in the history
  • Loading branch information
lhecker committed Mar 19, 2024
1 parent 287422b commit a478a59
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/host/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,12 @@ std::wstring ReadOutputStringW(const SCREEN_INFORMATION& screenInfo,
// Otherwise, add anything that isn't a trailing cell. (Trailings are duplicate copies of the leading.)
if (it->DbcsAttr() != DbcsAttribute::Trailing)
{
retVal += it->Chars();
auto chars = it->Chars();
if (chars.size() > 1)
{
chars = { &UNICODE_REPLACEMENT, 1 };
}
retVal += chars;
}
}

Expand Down

0 comments on commit a478a59

Please sign in to comment.