From a808990bc6b94b746825ef12b8e7da27b68d25ad Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Wed, 15 Jun 2022 16:46:54 -0500 Subject: [PATCH] you want the higher number, not the lower --- Engine/source/console/arrayObject.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Engine/source/console/arrayObject.cpp b/Engine/source/console/arrayObject.cpp index 009803cfb..6449775ef 100644 --- a/Engine/source/console/arrayObject.cpp +++ b/Engine/source/console/arrayObject.cpp @@ -155,7 +155,7 @@ bool ArrayObject::_addKeyFromField( void *object, const char *index, const char S32 ArrayObject::getIndexFromValue( const String &value ) const { - S32 currentIndex = mMin(mCurrentIndex, 0); + S32 currentIndex = mMax(mCurrentIndex, 0); S32 foundIndex = -1; for ( S32 i = currentIndex; i < mArray.size(); i++ ) { @@ -185,7 +185,7 @@ S32 ArrayObject::getIndexFromValue( const String &value ) const S32 ArrayObject::getIndexFromKey( const String &key ) const { - S32 currentIndex = mMin(mCurrentIndex, 0); + S32 currentIndex = mMax(mCurrentIndex, 0); S32 foundIndex = -1; for ( S32 i = currentIndex; i < mArray.size(); i++ ) { @@ -215,7 +215,7 @@ S32 ArrayObject::getIndexFromKey( const String &key ) const S32 ArrayObject::getIndexFromKeyValue( const String &key, const String &value ) const { - S32 currentIndex = mMin(mCurrentIndex, 0); + S32 currentIndex = mMax(mCurrentIndex, 0); S32 foundIndex = -1; for ( S32 i = currentIndex; i < mArray.size(); i++ ) {