MantisBT - VCMI | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0001423 | VCMI | GUI - Other | public | 2013-08-30 22:25 | 2022-04-11 17:49 |
Reporter | Tow | ||||
Assigned To | Ivan | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0001423: Some labels are not visible | ||||
Description | Using the latest trunk (r3521) I observed that any labels are not rendered. Bug affects centered labels that doesn't have set proper width (eg. "Show available scenarios" button in pregame or building names in Town Hall screen). In method void CTextContainer::blitLine (CIntObjectClasses.cpp l. 1240) this code: if (alignment == CENTER) { where.x += (destRect.w - f->getStringWidth(what)) / 2; where.y += (destRect.h - f->getLineHeight()) / 2; } causes unsigned integer underflow: destRect sizes are zero. I'd consider using signed integeres for return values of getStringWidth and getLineHeight. It is very easy to introduce such error with unsigned ints. | ||||
Steps To Reproduce | Run r3521, enter scenario selection screen. "Show available scenarios" button label is not visible. | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2013-08-30 22:25 | Tow | New Issue | |||
2013-08-30 22:25 | Tow | Status | new => assigned | ||
2013-08-30 22:25 | Tow | Assigned To | => Ivan | ||
2013-08-31 00:23 | Ivan | Note Added: 0003916 | |||
2013-08-31 00:24 | Ivan | Status | assigned => resolved | ||
2013-08-31 00:24 | Ivan | Resolution | open => fixed | ||
2022-04-11 17:49 | Povelitel | Status | resolved => closed |
Notes | |||||
|
|||||
|
|