diff options
author | Marek Safar <marek.safar@gmail.com> | 2011-04-20 15:02:14 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2011-04-20 15:02:49 +0400 |
commit | 57bcdb9d97df8f9201284e06ad1007889b649b03 (patch) | |
tree | 4536334585ac69df01db59cffa80737d8dbda736 /mcs | |
parent | a316b856d044dfc68b2d48b4c4e0d2c666cee938 (diff) |
Use correct local variable when interating parameter modifiers
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/mcs/pending.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mcs/mcs/pending.cs b/mcs/mcs/pending.cs index 9db58109835..696797aa01f 100644 --- a/mcs/mcs/pending.cs +++ b/mcs/mcs/pending.cs @@ -11,6 +11,7 @@ // Copyright 2003-2008 Novell, Inc. // +using System; using System.Collections.Generic; using System.Linq; @@ -226,15 +227,16 @@ namespace Mono.CSharp { bool ref_only_difference = false; var cp = compared_method.Parameters.FixedParameters; var tp = tested_method.Parameters.FixedParameters; - for (int pi = 0; pi < compared_method.Parameters.Count; ++pi) { + + for (int pi = 0; pi < cp.Length; ++pi) { // // First check exact modifiers match // const Parameter.Modifier ref_out = Parameter.Modifier.REF | Parameter.Modifier.OUT; - if ((cp[i].ModFlags & ref_out) == (tp[i].ModFlags & ref_out)) + if ((cp[pi].ModFlags & ref_out) == (tp[pi].ModFlags & ref_out)) continue; - if ((cp[i].ModFlags & tp[i].ModFlags & Parameter.Modifier.ISBYREF) != 0) { + if ((cp[pi].ModFlags & tp[pi].ModFlags & Parameter.Modifier.ISBYREF) != 0) { ref_only_difference = true; continue; } |