mirror of https://github.com/mgba-emu/mgba.git
Util: Fix warnings
This commit is contained in:
parent
a4d8c433c6
commit
19e44d59d0
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue