- fixed cursor positioning in console with double-wide characters present.

This commit is contained in:
Christoph Oelckers 2019-03-11 18:24:42 +01:00
parent d5410a8828
commit 109413b3a1

View file

@ -262,7 +262,7 @@ public:
cells -= w / 9; cells -= w / 9;
} }
*overflow = (cells < 0); *overflow = (cells < 0);
return cells; return chars;
} }
@ -297,8 +297,8 @@ public:
if (overflow) if (overflow)
{ {
// We ended up in the middle of a double cell character, so set the start to the following character. // We ended up in the middle of a double cell character, so set the start to the following character.
StartPos++;
StartPosCells++; StartPosCells++;
StartPos = CharsForCells(StartPosCells, &overflow);
} }
} }