Avoid division by zero in softbody constraint solving

Thanks majestik for reporting the issue and providing a patch, see Issue 469

Fix bug in findBinarySearch, luckily this method was not used yet.
Thanks snowcat for reporting a fix for this issue:
http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=6294
This commit is contained in:
erwin.coumans
2011-01-30 21:17:18 +00:00
parent b37edd81cd
commit cb497b88a6
2 changed files with 7 additions and 5 deletions

View File

@@ -406,7 +406,7 @@ class btAlignedObjectArray
int findBinarySearch(const T& key) const
{
int first = 0;
int last = size();
int last = size()-1;
//assume sorted array
while (first <= last) {