fixed splitting in symbol font

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@138 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-12-21 22:17:23 +00:00
parent a9a93c07c3
commit 78edb91deb
+2 -2
View File
@@ -144,10 +144,10 @@ void SymbolFont::split(const String& text, SplitSymbols& out) const {
for (size_t pos = 0 ; pos < text.size() ; ) { for (size_t pos = 0 ; pos < text.size() ; ) {
// 1. check merged numbers // 1. check merged numbers
if (merge_numbers && pos + 1 < text.size()) { if (merge_numbers && pos + 1 < text.size()) {
size_t num_count = text.find_first_not_of(_("0123456789"), pos); size_t num_count = text.find_first_not_of(_("0123456789"), pos) - pos;
if (num_count >= 2) { if (num_count >= 2) {
// draw single symbol for the whole number // draw single symbol for the whole number
out.push_back(DrawableSymbol(text.substr(0, num_count), 0)); out.push_back(DrawableSymbol(text.substr(pos, num_count), nullptr));
pos += num_count; pos += num_count;
goto next_symbol; goto next_symbol;
} }