Mercurial > sdl-ios-xcode
changeset 4836:7eb8ca721a5b
Fixed the off-by-one bug in SDL_RecursivelyCalculateShapeTree().
author | egottlieb |
---|---|
date | Fri, 06 Aug 2010 13:52:38 -0400 |
parents | 40b5293d0598 |
children | 2e446923c9fb |
files | src/video/SDL_shape.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/video/SDL_shape.c Thu Aug 05 21:27:32 2010 -0400 +++ b/src/video/SDL_shape.c Fri Aug 06 13:52:38 2010 -0400 @@ -168,13 +168,13 @@ 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;