From 6596865d92d0ab8b73afd2dfeba9fa2ef1344c31 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 26 May 2025 15:16:18 -0500 Subject: [PATCH] overflow avoidance --- Engine/source/core/util/tVector.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Engine/source/core/util/tVector.h b/Engine/source/core/util/tVector.h index 0700a5554..c7c4fc7a4 100644 --- a/Engine/source/core/util/tVector.h +++ b/Engine/source/core/util/tVector.h @@ -407,7 +407,7 @@ template inline void Vector::insert(U32 index) dMemmove(&mArray[index + 1], &mArray[index], - (mElementCount - index - 1) * sizeof(value_type)); + dsize_t(mElementCount - index - 1) * sizeof(value_type)); constructInPlace(&mArray[index]); } @@ -428,7 +428,7 @@ template inline void Vector::erase(U32 index) { dMemmove(&mArray[index], &mArray[index + 1], - (mElementCount - index - 1) * sizeof(value_type)); + dsize_t(mElementCount - index - 1) * sizeof(value_type)); } mElementCount--; @@ -461,7 +461,7 @@ template inline void Vector::erase(U32 index, U32 count) dMemmove( &mArray[index], &mArray[index + count], - (mElementCount - index - count) * sizeof(value_type)); + dsize_t(mElementCount - index - count) * sizeof(value_type)); mElementCount -= count; }