1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

- fixes #1423 - convert values to int before using

This commit is contained in:
Ivan Savenko 2013-08-31 00:21:29 +00:00
parent fba4c2cf9e
commit 7f43150bb9

View File

@ -1252,8 +1252,8 @@ void CTextContainer::blitLine(SDL_Surface *to, Rect destRect, std::string what)
if (alignment == CENTER)
{
where.x += (destRect.w - f->getStringWidth(what)) / 2;
where.y += (destRect.h - f->getLineHeight()) / 2;
where.x += (int(destRect.w) - int(f->getStringWidth(what))) / 2;
where.y += (int(destRect.h) - int(f->getLineHeight())) / 2;
}
if (alignment == BOTTOMRIGHT)