Branch: Tag:

2015-10-14

2015-10-14 20:43:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

ADT.Heap: Fixed ADT_HEAP_DEBUG.

29: Inside #if defined(ADT_HEAP_DEBUG)
   if (values[e]->pos != e)    error("Error in HEAP: Element %d has invalid position: %d.\n",    e, values[e]->pos); -  if(values[(e-1)/2] > values[e]) +  if(e && (values[(e-1)/2] > values[e]))    error("Error in HEAP (%d, %d) num_values=%d\n",    (e-1)/2, e, num_values);    }