From a397fef958ce2ef31ca0a2021b1e6044eb1220a4 Mon Sep 17 00:00:00 2001 From: "bernard.xiong" Date: Wed, 21 Sep 2011 10:11:47 +0000 Subject: [PATCH] fixed parameters check in rtgui_dc_draw_annulus function. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1718 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/rtgui/common/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/rtgui/common/dc.c b/components/rtgui/common/dc.c index 5c7d13003..9979668c6 100644 --- a/components/rtgui/common/dc.c +++ b/components/rtgui/common/dc.c @@ -906,7 +906,7 @@ void rtgui_dc_draw_annulus(struct rtgui_dc *dc, rt_int16_t x, rt_int16_t y, rt_i rt_int16_t temp_val = 0; /* Sanity check radius */ - if ((r1 < 0) || (r1 < 0)) return ; + if ((r1 < 0) || (r2 < 0)) return ; /* Special case for r=0 - draw a point */ if ((r1 == 0) && (r2 == 0)) { -- GitLab