Fixes: 465

Signed-off-by: Anton Lundin <gla...@acc.umu.se>
---
 profile.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/profile.c b/profile.c
index 2102179..20f157c 100644
--- a/profile.c
+++ b/profile.c
@@ -1131,6 +1131,9 @@ static void calculate_gas_information_new(struct dive 
*dive, struct plot_info *p
                fo2 = get_o2(&dive->cylinder[cylinderindex].gasmix);
                fhe = get_he(&dive->cylinder[cylinderindex].gasmix);
                double ratio = (double)fhe / (1000.0 - fo2);
+               /* if we have 100% o2, ratio is nan */
+               if (isnan(ratio))
+                       ratio = 0;
 
                if (entry->po2) {
                        /* we have an O2 partial pressure in the sample - so 
this
-- 
1.8.3.2

_______________________________________________
subsurface mailing list
subsurface@hohndel.org
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to