summaryrefslogtreecommitdiff
path: root/src/heap.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-12-06 09:32:19 +0000
committerMike Buland <eichlan@xagasoft.com>2009-12-06 09:32:19 +0000
commit3cef0a39bc70308fd5a1fb3783c5f4ca716aca80 (patch)
treef3f161169d64f18b3820131ea431e68ac4b2486d /src/heap.h
parent2408f61837aaaba5590d290008721186ea9f011e (diff)
downloadlibbu++-3cef0a39bc70308fd5a1fb3783c5f4ca716aca80.tar.gz
libbu++-3cef0a39bc70308fd5a1fb3783c5f4ca716aca80.tar.bz2
libbu++-3cef0a39bc70308fd5a1fb3783c5f4ca716aca80.tar.xz
libbu++-3cef0a39bc70308fd5a1fb3783c5f4ca716aca80.zip
I corrected a peculiar heap corner case that caused an infinite loop.
Diffstat (limited to 'src/heap.h')
-rw-r--r--src/heap.h2
1 files changed, 2 insertions, 0 deletions
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
95 for( int j = iFill; j >= 0; ) 95 for( int j = iFill; j >= 0; )
96 { 96 {
97 int k = (j-1)/2; 97 int k = (j-1)/2;
98 if( j == k )
99 break;
98 if( cmp( aItem[k], aItem[j] ) ) 100 if( cmp( aItem[k], aItem[j] ) )
99 break; 101 break;
100 102