- fixed potential crash when drawing status bar log

src/g_statusbar/shared_sbar.cpp:1133:34: warning: comparison of integers of different signs: 'unsigned int' and 'int'
[-Wsign-compare]
This commit is contained in:
alexey.lysiuk 2018-11-01 13:37:11 +02:00
parent b5853b4d8e
commit d99aeb0895
1 changed files with 2 additions and 3 deletions

View File

@ -1130,10 +1130,9 @@ void DBaseStatusBar::DrawLog ()
Scale(w, SCREENWIDTH, hudwidth), Scale(height, SCREENHEIGHT, hudheight));
x+=20;
y+=10;
for (int i = 0; lines[i].Width != -1; i++)
for (const FBrokenLines &line : lines)
{
screen->DrawText (SmallFont, CR_UNTRANSLATED, x, y, lines[i].Text,
screen->DrawText (SmallFont, CR_UNTRANSLATED, x, y, line.Text,
DTA_KeepRatio, true,
DTA_VirtualWidth, hudwidth, DTA_VirtualHeight, hudheight, TAG_DONE);
y += SmallFont->GetHeight ()+1;