From d97d47b3ed0f8e94ab031e47ff04033753d7a4f0 Mon Sep 17 00:00:00 2001 From: sebastid Date: Tue, 22 Mar 2005 18:51:35 +0000 Subject: [PATCH] Cleanup SVN revision: 13854 --- src/bin/e_desk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c index 593f4f9..3e25268 100644 --- a/src/bin/e_desk.c +++ b/src/bin/e_desk.c @@ -148,7 +148,7 @@ e_desk_at_xy_get(E_Zone *zone, int x, int y) E_OBJECT_CHECK_RETURN(zone, NULL); E_OBJECT_TYPE_CHECK_RETURN(zone, E_ZONE_TYPE, NULL); - if (x >= zone->desk_x_count || y >= zone->desk_y_count) + if ((x >= zone->desk_x_count) || (y >= zone->desk_y_count)) return NULL; return (E_Desk *) zone->desks[x + (y * zone->desk_x_count)]; @@ -194,11 +194,11 @@ e_desk_next(E_Zone *zone) y = zone->desk_y_current; x++; - if (x == zone->desk_x_count) + if (x >= zone->desk_x_count) { x = 0; y++; - if (y == zone->desk_y_count) + if (y >= zone->desk_y_count) y = 0; } -- 2.7.4