Fix own error in a8124a2cb4

This commit is contained in:
Campbell Barton 2023-09-08 16:50:51 +10:00
parent 45305a5ad1
commit 0ff8ed788d
1 changed files with 1 additions and 1 deletions

View File

@ -837,7 +837,7 @@ void BKE_defvert_remove_group(MDeformVert *dvert, MDeformWeight *dw)
return;
}
/* Ensure `dw` is part of `dvert` (security check). */
if (UNLIKELY(uintptr_t(dw - dvert->dw) < uintptr_t(dvert->totweight))) {
if (UNLIKELY(uintptr_t(dw - dvert->dw) >= uintptr_t(dvert->totweight))) {
/* Assert as an invalid `dw` (while supported) isn't likely to do what the caller expected. */
BLI_assert_unreachable();
return;