X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fheap.h;h=7be54cfa54665ee1808c00c0fb8ce9e2b78a661a;hb=157acec25f2e60c76607edc3d62cf23fe47f4efe;hp=268cc2572cd8d3ad855464d7c8a6e2a5b41dead7;hpb=dd1d31f3e9b115b3e5a35d18243880ebc41990f2;p=libucw.git diff --git a/lib/heap.h b/lib/heap.h index 268cc257..7be54cfa 100644 --- a/lib/heap.h +++ b/lib/heap.h @@ -71,9 +71,9 @@ do { \ uns j, l, u; \ type x; \ - swap(heap,pos,num,x); \ - num--; \ j = pos; \ + swap(heap,j,num,x); \ + num--; \ if (less(heap[j], heap[num+1])) \ HEAP_BUBBLE_UP_J(heap,num,less,swap) \ else \