From b3c0f8938dd0fdb8b2d7894841fddeec70f90f9c Mon Sep 17 00:00:00 2001 From: Nicu Badescu Date: Sat, 1 Mar 2014 01:38:42 +0200 Subject: Fix negative value for depths in Information Box The get_depth_units function was expecting an unsigned int as a first parameter. When it received a negative integer, the function made a cast to an unsigned int, resulting in a very big number. Signed-off-by: Nicu Badescu Signed-off-by: Dirk Hohndel --- dive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dive.c') diff --git a/dive.c b/dive.c index 6f9f4a922..405812271 100644 --- a/dive.c +++ b/dive.c @@ -123,7 +123,7 @@ unsigned int units_to_depth(double depth) return feet_to_mm(depth); } -double get_depth_units(unsigned int mm, int *frac, const char **units) +double get_depth_units(int mm, int *frac, const char **units) { int decimals; double d; -- cgit v1.2.3-70-g09d2