On Thu, Jul 03, 2014 at 08:40:14AM -0700, Dirk Hohndel wrote: > And if the divelist is empty (or dive is NULL) get_divenr will give us -1 > and the while condition will also be false. That is of course blatantly wrong. More coffee. But we test for dive==NULL a few lines before the snippet I posted /D