Merge pull request #819 from Azaezel/alpha40/rangefix2

you want the higher number, not the lower
This commit is contained in:
Brian Roberts 2022-06-15 16:47:19 -05:00 committed by GitHub
commit 2a52d7db1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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++ )
{