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.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp
index 6355aed..66c73a9 100644
--- a/src/graphics/engine/text.cpp
+++ b/src/graphics/engine/text.cpp
@@ -407,10 +407,10 @@ int CText::Justify(const std::string &text, FontType font, float size, float wid
if (len >= 3)
ch.c3 = text[index+2];
- index += len;
-
if (ch.c1 == '\n')
+ {
return index+1;
+ }
if (ch.c1 == ' ' )
cut = index+1;
@@ -421,6 +421,7 @@ int CText::Justify(const std::string &text, FontType font, float size, float wid
if (cut == 0) return index;
else return cut;
}
+ index += len;
}
return index;