summaryrefslogtreecommitdiffstats
path: root/src/graphics/engine/text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics/engine/text.cpp')
-rw-r--r--src/graphics/engine/text.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp
index 581ff01..d0c9cc8 100644
--- a/src/graphics/engine/text.cpp
+++ b/src/graphics/engine/text.cpp
@@ -646,7 +646,13 @@ void CText::DrawString(const std::string &text, std::vector<FontMetaChar>::itera
DrawCharAndAdjustPos(ch, font, size, pos, color);
- fmtIndex++;
+ // increment fmtIndex for each byte in multibyte character
+ if ( ch.c1 != 0 )
+ fmtIndex++;
+ if ( ch.c2 != 0 )
+ fmtIndex++;
+ if ( ch.c3 != 0 )
+ fmtIndex++;
}
if (eol != 0)