Merge pull request #1357 from colobot/dev-fix-satcom-crash-again

Fix crashes in SatCom on some \button characters
pyro-refactor
Mateusz Przybył 2020-09-21 16:55:30 +02:00 committed by GitHub
commit d71ee4ef68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -459,7 +459,7 @@ float CText::GetStringWidth(const std::string &text,
width += GetCharWidth(ch, font, size, width); width += GetCharWidth(ch, font, size, width);
index += len; index += len;
fmtIndex++; fmtIndex += len;
} }
return width; return width;
@ -607,7 +607,7 @@ int CText::Justify(const std::string &text, std::vector<FontMetaChar>::iterator
} }
index += len; index += len;
fmtIndex++; fmtIndex += len;
} }
return index; return index;
@ -685,7 +685,7 @@ int CText::Detect(const std::string &text, std::vector<FontMetaChar>::iterator f
pos += width; pos += width;
index += len; index += len;
fmtIndex++; fmtIndex += len;
} }
return index; return index;