From 109413b3a193b58d36c0fc01e64646f08df61851 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 11 Mar 2019 18:24:42 +0100 Subject: [PATCH] - fixed cursor positioning in console with double-wide characters present. --- src/c_console.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c_console.cpp b/src/c_console.cpp index 01872777a..b46fe7fcd 100644 --- a/src/c_console.cpp +++ b/src/c_console.cpp @@ -262,7 +262,7 @@ public: cells -= w / 9; } *overflow = (cells < 0); - return cells; + return chars; } @@ -297,8 +297,8 @@ public: if (overflow) { // We ended up in the middle of a double cell character, so set the start to the following character. - StartPos++; StartPosCells++; + StartPos = CharsForCells(StartPosCells, &overflow); } }