MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001423VCMIGUI - Otherpublic2013-08-30 22:252022-04-11 17:49
ReporterTow 
Assigned ToIvan 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001423: Some labels are not visible
DescriptionUsing 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 ReproduceRun r3521, enter scenario selection screen. "Show available scenarios" button label is not visible.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0003916)
Ivan (developer)
2013-08-31 00:23

Should be fixed now. On my side it was OK likely due to 64-bit system.

- 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

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean