diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-11 09:40:35 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-11 09:40:35 +0400 |
commit | 98c574e41a8c2cd9ecb0d25afef8578c3e79289b (patch) | |
tree | 3b4c100e8bc38ac9ecddcc86e0572d8af1fec816 /source/blender/blenlib | |
parent | a62163ada389a18d11f0c085654916e2ef069a46 (diff) |
use 'greater/less then or equal to' operators rather then adding 1.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdtree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdtree.c b/source/blender/blenlib/intern/BLI_kdtree.c index 0e7602b7e6b..dd54fe681b0 100644 --- a/source/blender/blenlib/intern/BLI_kdtree.c +++ b/source/blender/blenlib/intern/BLI_kdtree.c @@ -349,7 +349,7 @@ static void add_in_range(KDTreeNearest **ptn, int found, int *totfoundstack, int { KDTreeNearest *to; - if (found + 1 > *totfoundstack) { + if (found >= *totfoundstack) { KDTreeNearest *temp = MEM_callocN((*totfoundstack + 50) * sizeof(KDTreeNode), "psys_treefoundstack"); memcpy(temp, *ptn, *totfoundstack * sizeof(KDTreeNearest)); if (*ptn) |