Util: Fix warnings

This commit is contained in:
Vicki Pfau 2023-08-10 12:06:29 -07:00
parent a4d8c433c6
commit 19e44d59d0
1 changed files with 4 additions and 1 deletions

View File

@ -593,7 +593,10 @@ static void mPainterFillRectangle(struct mPainter* painter, int x, int y, int wi
static void mPainterStrokeRectangle(struct mPainter* painter, int x, int y, int width, int height) { static void mPainterStrokeRectangle(struct mPainter* painter, int x, int y, int width, int height) {
uint32_t fillColor = painter->fillColor; uint32_t fillColor = painter->fillColor;
painter->fillColor = painter->strokeColor; painter->fillColor = painter->strokeColor;
if (width <= painter->strokeWidth * 2 || height <= painter->strokeWidth * 2) { if (width < 0 || height < 0) {
return;
}
if ((unsigned) width <= painter->strokeWidth * 2 || (unsigned) height <= painter->strokeWidth * 2) {
mPainterFillRectangle(painter, x, y, width, height); mPainterFillRectangle(painter, x, y, width, height);
} else { } else {
int lr = height - painter->strokeWidth; int lr = height - painter->strokeWidth;