From 3cef0a39bc70308fd5a1fb3783c5f4ca716aca80 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 6 Dec 2009 09:32:19 +0000 Subject: I corrected a peculiar heap corner case that caused an infinite loop. --- src/heap.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/heap.h') diff --git a/src/heap.h b/src/heap.h index 523c8e2..60c39ac 100644 --- a/src/heap.h +++ b/src/heap.h @@ -95,6 +95,8 @@ namespace Bu for( int j = iFill; j >= 0; ) { int k = (j-1)/2; + if( j == k ) + break; if( cmp( aItem[k], aItem[j] ) ) break; -- cgit v1.2.3