Bug fix. If a bytecode instruction refers to an invalid constant pool entry, MarkLinkRequiredConstantPoolItem should not throw an exception, but simply ignore the mark, the incorrect bytecode will be reported later during verification.

This commit is contained in:
jfrijters 2012-07-20 08:46:34 +00:00
Родитель de9e5f584c
Коммит 6147f462ae
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -542,7 +542,7 @@ namespace IKVM.Internal
private void MarkLinkRequiredConstantPoolItem(int index)
{
if (index != 0)
if (index > 0 && index < constantpool.Length && constantpool[index] != null)
{
constantpool[index].MarkLinkRequired();
}