From 855f53901a2265400797f33f3fb8b53ddc6cc07f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 5 Feb 2022 02:52:56 +0200 Subject: SL-16799 Clean up use of hardcoded folder names --- indra/llcommon/llalignedarray.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llalignedarray.h b/indra/llcommon/llalignedarray.h index 5f52bc0b15..da9d98c16c 100644 --- a/indra/llcommon/llalignedarray.h +++ b/indra/llcommon/llalignedarray.h @@ -116,7 +116,7 @@ void LLAlignedArray::resize(U32 size) template T& LLAlignedArray::operator[](int idx) { - if(idx >= mElementCount) + if(idx >= mElementCount || idx < 0) { LL_ERRS() << "Out of bounds LLAlignedArray, requested: " << (S32)idx << " size: " << mElementCount << LL_ENDL; } @@ -126,7 +126,7 @@ T& LLAlignedArray::operator[](int idx) template const T& LLAlignedArray::operator[](int idx) const { - if (idx >= mElementCount) + if (idx >= mElementCount || idx < 0) { LL_ERRS() << "Out of bounds LLAlignedArray, requested: " << (S32)idx << " size: " << mElementCount << LL_ENDL; } -- cgit v1.2.3