From d039fdc6f9fa2c6bc5b50abc77e0cdf6543a1a5e Mon Sep 17 00:00:00 2001 From: elfmz Date: Sun, 6 Nov 2022 13:54:19 +0300 Subject: VT log: fix #1390 --- far2l/src/vt/vtlog.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/far2l/src/vt/vtlog.cpp b/far2l/src/vt/vtlog.cpp index 36364b78..c8ccb516 100644 --- a/far2l/src/vt/vtlog.cpp +++ b/far2l/src/vt/vtlog.cpp @@ -58,7 +58,7 @@ namespace VTLog static void EncodeLine(std::string &out, unsigned int Width, const CHAR_INFO *Chars, bool colored) { DWORD64 attr_prev = (DWORD64)-1; - for (unsigned int i = 0; i < Width; ++i) { + for (unsigned int i = 0; i < Width; ++i) if (Chars[i].Char.UnicodeChar) { const DWORD64 attr_now = Chars[i].Attributes; if ( colored && attr_now != attr_prev) { const bool tc_back_now = (attr_now & BACKGROUND_TRUECOLOR) != 0; @@ -108,11 +108,8 @@ namespace VTLog } else if (Chars[i].Char.UnicodeChar > 0x80) { Wide2MB_UnescapedAppend(Chars[i].Char.UnicodeChar, out); - } else if (Chars[i].Char.UnicodeChar != 0) { - out+= (char)(unsigned char)Chars[i].Char.UnicodeChar; - } else { - out+= L' '; + out+= (char)(unsigned char)Chars[i].Char.UnicodeChar; } } if (colored && attr_prev != 0xffff) { -- cgit v1.2.3