Browse Source

Fix typo in MetadataModule.GetDefinition

pull/3680/head
Siegfried Pammer 4 months ago
parent
commit
91d7a76b94
  1. 4
      ICSharpCode.Decompiler/TypeSystem/MetadataModule.cs

4
ICSharpCode.Decompiler/TypeSystem/MetadataModule.cs

@ -274,7 +274,7 @@ namespace ICSharpCode.Decompiler.TypeSystem
return new MetadataProperty(this, handle); return new MetadataProperty(this, handle);
int row = MetadataTokens.GetRowNumber(handle); int row = MetadataTokens.GetRowNumber(handle);
Debug.Assert(row != 0); Debug.Assert(row != 0);
if (row >= methodDefs.Length) if (row >= propertyDefs.Length)
HandleOutOfRange(handle); HandleOutOfRange(handle);
var property = LazyInit.VolatileRead(ref propertyDefs[row]); var property = LazyInit.VolatileRead(ref propertyDefs[row]);
if (property != null) if (property != null)
@ -291,7 +291,7 @@ namespace ICSharpCode.Decompiler.TypeSystem
return new MetadataEvent(this, handle); return new MetadataEvent(this, handle);
int row = MetadataTokens.GetRowNumber(handle); int row = MetadataTokens.GetRowNumber(handle);
Debug.Assert(row != 0); Debug.Assert(row != 0);
if (row >= methodDefs.Length) if (row >= eventDefs.Length)
HandleOutOfRange(handle); HandleOutOfRange(handle);
var ev = LazyInit.VolatileRead(ref eventDefs[row]); var ev = LazyInit.VolatileRead(ref eventDefs[row]);
if (ev != null) if (ev != null)

Loading…
Cancel
Save