From d40816d4953e5c9c470740e92e01b48631304739 Mon Sep 17 00:00:00 2001 From: de4dot Date: Sun, 25 Dec 2011 23:07:07 +0100 Subject: [PATCH] Add another check --- blocks/ScopeBlock.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blocks/ScopeBlock.cs b/blocks/ScopeBlock.cs index 53996920..c6f6fa0d 100644 --- a/blocks/ScopeBlock.cs +++ b/blocks/ScopeBlock.cs @@ -189,6 +189,8 @@ namespace de4dot.blocks { if (insane) { if (newBaseBlocks.Count != baseBlocks.Count) throw new ApplicationException("BlocksSorter included too many/few BaseBlocks"); + if (baseBlocks.Count > 0 && baseBlocks[0] != newBaseBlocks[0]) + throw new ApplicationException("BlocksSorter removed the start block"); foreach (var bb in baseBlocks) { if (!newBaseBlocks.Contains(bb)) throw new ApplicationException("BlocksSorter forgot a child");