Bug fix. Exception blocks inside potential try { } finally { } blocks were not handled correctly. Could result in finally blocks that run multiple times (when an exception occurs).

This commit is contained in:
jfrijters 2011-08-29 06:36:08 +00:00
Родитель 3649c5ab9a
Коммит c1c7e8a161
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -3441,7 +3441,7 @@ sealed class MethodAnalyzer
nextIsReachable = false;
for (int j = 0; j < exceptions.Length; j++)
{
if (j != exceptionIndex && exceptions[j].startIndex <= exception.startIndex && exception.endIndex <= exceptions[j].endIndex)
if (j != exceptionIndex && exceptions[j].startIndex >= exception.startIndex && exception.endIndex <= exceptions[j].endIndex)
{
UpdateTryBlockExit(exception, exceptions[j].handlerIndex, ref exit, ref fail);
}