cc_draw: ensure unsigned values

avoids possible signed integer overflow runtime errors


Origin commit data
------------------
Commit: 9874a589c7
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-12-02 (Thu, 02 Dec 2021)
This commit is contained in:
2021-12-02 19:04:41 +01:00
committed by vanhofen
parent 98c8735603
commit 06e8711a36

View File

@@ -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)