mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
fix(model): correct binary search behavior in CM2Model::FindKey
This commit is contained in:
parent
a72ba6f154
commit
46e5611630
@ -950,7 +950,7 @@ void CM2Model::FindKey(M2ModelBoneSeq* sequence, const M2TrackBase& track, uint3
|
|||||||
// Perform binary search for key containing sequence time
|
// Perform binary search for key containing sequence time
|
||||||
|
|
||||||
int32_t lowKey = 0;
|
int32_t lowKey = 0;
|
||||||
int32_t highKey = numKeys;
|
int32_t highKey = numKeys - 1;
|
||||||
|
|
||||||
while (lowKey < highKey) {
|
while (lowKey < highKey) {
|
||||||
int32_t midKey = (lowKey + highKey) / 2;
|
int32_t midKey = (lowKey + highKey) / 2;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user