AGOS: Fix operator precedence warning

This commit is contained in:
Julien 2011-06-04 02:56:25 +08:00 committed by Julien
parent 1cc7faa242
commit a8b13e8a6b

View File

@ -517,8 +517,7 @@ void AGOSEngine::printScreenText(uint vgaSpriteId, uint color, const char *strin
y -= textHeight;
} else
pos = stringLength;
padding = (lettersPerRow - pos) % 2 ?
(lettersPerRow - pos) / 2 + 1 : (lettersPerRow - pos) / 2;
padding = ((lettersPerRow - pos) % 2) ? (lettersPerRow - pos) / 2 + 1 : (lettersPerRow - pos) / 2;
while (padding--)
*convertedString2++ = ' ';
stringLength -= pos;