gui2/canvas: Fix zero-width rectangles being painted 1 px-wide

This fixes the selection highlight for textboxes glitching into view as
a 1 px-wide highlight on the left end when there isn't an active
selection.
This commit is contained in:
Ignacio R. Morelle 2016-10-04 01:41:40 -03:00
parent 5e005007bd
commit 7fa70375e1

View file

@ -738,7 +738,7 @@ void trectangle::draw(surface& canvas,
}
// Fill the background, if applicable
if(fill_color_) {
if(fill_color_ && w && h) {
set_renderer_color(renderer, fill_color_);
SDL_Rect area {