- 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

View file

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