X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fq.c;h=d91d17f02ff874afe4acc6318bfa7884117787c2;hp=615f2fe252cdaef1911b0b62183e4307eaf3f34a;hb=f00ad28507322054abc4859cb2049ec6f807c0c8;hpb=5a9b4530f6a84ce3666a94605270bddaf43c9ff2 diff --git a/lib/q.c b/lib/q.c index 615f2fe..d91d17f 100644 --- a/lib/q.c +++ b/lib/q.c @@ -265,6 +265,7 @@ void* heap_max(heap_t*h) void* heap_chopmax(heap_t*h) { void*p = h->elements[0]; + assert(h->size); h->elements[0] = h->elements[--h->size]; down(h,0); return p;