Fix precondition for morph weights. (#5308)

Was checking for `MAX - 1` instead of `MAX`.
This commit is contained in:
Alexander Biggs
2022-03-10 16:46:33 -08:00
committed by GitHub
parent 2b395f1d89
commit 1cb59685c5
@@ -644,7 +644,7 @@ static void updateMorphWeights(FEngine& engine, backend::Handle<backend::HwBuffe
void FRenderableManager::setMorphWeights(Instance instance, float const* weights,
size_t count, size_t offset) {
if (instance) {
ASSERT_PRECONDITION(count + offset < CONFIG_MAX_MORPH_TARGET_COUNT,
ASSERT_PRECONDITION(count + offset <= CONFIG_MAX_MORPH_TARGET_COUNT,
"Only %d morph targets are supported (count=%d, offset=%d)",
CONFIG_MAX_MORPH_TARGET_COUNT, count, offset);