SVN revision: 13854
This commit is contained in:
sebastid 2005-03-22 18:51:35 +00:00 committed by sebastid
parent a6fb17f74a
commit d97d47b3ed
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}