Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/ikvm-fork.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Bjarne Kvinge <rolf@xamarin.com>2020-10-02 11:12:12 +0300
committerMarek Safar <marek.safar@gmail.com>2020-10-02 11:36:18 +0300
commit102c92088f7818b8d8ca9867358d46cc13f92356 (patch)
treea88781c88cbe894c8c36065d57de9e34906c95a6
parent1b3c820405a003b30f9aedf06d39def54040f4b0 (diff)
Rearrange parenthesis to fix an IndexOutOfRangeException that occured because the 'start > 0' condition didn't cover the entire expression.
-rw-r--r--reflect/Metadata/Tables.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/reflect/Metadata/Tables.cs b/reflect/Metadata/Tables.cs
index d30cc42b..9a7f6cce 100644
--- a/reflect/Metadata/Tables.cs
+++ b/reflect/Metadata/Tables.cs
@@ -457,13 +457,13 @@ namespace IKVM.Reflection.Metadata
return new Enumerator(null, 0, 1, -1);
}
int start = index;
- while (start > 0 && (((records [start - 1].FilterKey & 0xFFFFFF) == (token & 0xFFFFFF))) || ((records [start - 1].FilterKey & 0xFFFFFF) == 0))
+ while (start > 0 && (((records [start - 1].FilterKey & 0xFFFFFF) == (token & 0xFFFFFF)) || ((records [start - 1].FilterKey & 0xFFFFFF) == 0)))
{
start--;
}
int end = index;
int max = table.RowCount - 1;
- while (end < max && (((records [end + 1].FilterKey & 0xFFFFFF) == (token & 0xFFFFFF))) || ((records [end + 1].FilterKey & 0xFFFFFF) == 0))
+ while (end < max && (((records [end + 1].FilterKey & 0xFFFFFF) == (token & 0xFFFFFF)) || ((records [end + 1].FilterKey & 0xFFFFFF) == 0)))
{
end++;
}