Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed the off-by-one bug in SDL_RecursivelyCalculateShapeTree().
Browse files Browse the repository at this point in the history
  • Loading branch information
egottlieb committed Aug 6, 2010
1 parent 7302cd5 commit 2f9d302
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/video/SDL_shape.c
Expand Up @@ -168,13 +168,13 @@ SDL_ShapeTree* RecursivelyCalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surfac
next.x = dimensions.x;
next.y = dimensions.y;
result->data.children.upleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,invert,next);
next.x = dimensions.w / 2 + 1;
next.x = dimensions.w / 2;
//Unneeded: next.y = dimensions.y;
result->data.children.upright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,invert,next);
next.x = dimensions.x;
next.y = dimensions.h / 2 + 1;
next.y = dimensions.h / 2;
result->data.children.downleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,invert,next);
next.x = dimensions.w / 2 + 1;
next.x = dimensions.w / 2;
//Unneeded: next.y = dimensions.h / 2 + 1;
result->data.children.downright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,invert,next);
return result;
Expand Down

0 comments on commit 2f9d302

Please sign in to comment.