Clear O2/H2 field if there is no tank information

Found using the new test dives

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2011-11-04 11:00:03 -07:00
parent 0e64a22c14
commit d906c82f31

View file

@ -178,8 +178,7 @@ void show_dive_stats(struct dive *dive)
gas_used += cyl->type.size.mliter / 1000.0 *
(cyl->start.mbar - cyl->end.mbar);
}
if (offset)
set_label(info_stat_w.o2he, buf);
set_label(info_stat_w.o2he, buf);
if (gas_used) {
value = get_volume_units(gas_used, &decimals, &unit);
set_label(info_stat_w.gas_used, "%.*f %s", decimals, value, unit);