Fix for IndexOutOfRangeException in ILReader.ReadOpCode(), part 2 (#84)

* Add failing test

* Fix OperandType.ShortInlineI handling

* Remove invalid comment
This commit is contained in:
Aristarkh Zagorodnikov
2019-02-10 23:48:48 +03:00
committed by Ben Adams
parent adef3aa266
commit 9b85871130
2 changed files with 5 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ namespace System.Diagnostics.Internal
case OperandType.ShortInlineBrTarget:
case OperandType.ShortInlineVar:
case OperandType.ShortInlineI:
inlineLength = 1;
break;
@@ -97,7 +98,6 @@ namespace System.Diagnostics.Internal
break;
default:
// Can return System.ArgumentException : Unexpected operand type xxx
return null;
}