X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fq.c;h=d91d17f02ff874afe4acc6318bfa7884117787c2;hb=aa0dddfad5bcbe7938b8fa365bd914d6d93324d7;hp=615f2fe252cdaef1911b0b62183e4307eaf3f34a;hpb=e4687b3aa2aed49fb16ba9e9561344d808750297;p=swftools.git 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;