as3: added xml string substitution, variable scoping compatibility, optimizations
[swftools.git] / lib / q.c
diff --git a/lib/q.c b/lib/q.c
index 615f2fe..d91d17f 100644 (file)
--- 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;