mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
cc_draw: ensure unsigned values
avoids possible signed integer overflow runtime errors
This commit is contained in:
@@ -908,12 +908,12 @@ int CCDraw::getYPos() const
|
||||
|
||||
int CCDraw::getHeight() const
|
||||
{
|
||||
return height;
|
||||
return std::max(0, height);
|
||||
}
|
||||
|
||||
int CCDraw::getWidth() const
|
||||
{
|
||||
return width;
|
||||
return std::max(0, width);
|
||||
}
|
||||
|
||||
void CCDraw::setDimensionsAll(const int& xpos, const int& ypos, const int& w, const int& h)
|
||||
|
Reference in New Issue
Block a user