From 4685709c25b5f22c51b6419c4898a689e8ffb4f9 Mon Sep 17 00:00:00 2001 From: Bryan Parno Date: Thu, 17 Sep 2015 15:30:39 -0700 Subject: Fix a check that occasionally led to an out of bounds exception in the extension --- Binaries/dafny | Bin 315 -> 19456 bytes Source/DafnyExtension/IdentifierTagger.cs | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Binaries/dafny b/Binaries/dafny index 889ebc81..05fa3203 100755 Binary files a/Binaries/dafny and b/Binaries/dafny differ diff --git a/Source/DafnyExtension/IdentifierTagger.cs b/Source/DafnyExtension/IdentifierTagger.cs index 5b70329d..d638cb6c 100644 --- a/Source/DafnyExtension/IdentifierTagger.cs +++ b/Source/DafnyExtension/IdentifierTagger.cs @@ -77,7 +77,7 @@ namespace DafnyLanguage int start = entire.Start; int end = entire.End; foreach (var r in _regions) { - if (0 <= r.Length && r.Start <= end && start <= r.Start + r.Length) { + if (0 <= r.Length && r.Start >= start && r.Start + r.Length <= end) { DafnyTokenKind kind; switch (r.Kind) { case IdRegion.OccurrenceKind.Use: -- cgit v1.2.3