aboutsummaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Nicu Badescu <badescunicu@yahoo.com>2014-03-01 01:38:42 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-28 16:32:01 -0800
commitb3c0f8938dd0fdb8b2d7894841fddeec70f90f9c (patch)
tree1eccd3e72cbd9778f32b92a58671f436a15315f0 /dive.h
parenta8bce0bb9f8c9a9140714b2381f139c45aeaeb29 (diff)
downloadsubsurface-b3c0f8938dd0fdb8b2d7894841fddeec70f90f9c.tar.gz
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 <badescunicu@yahoo.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/dive.h b/dive.h
index 9cc55c964..abbf4a7ae 100644
--- a/dive.h
+++ b/dive.h
@@ -152,7 +152,7 @@ typedef struct
} weightsystem_t;
extern int get_pressure_units(unsigned int mb, const char **units);
-extern double get_depth_units(unsigned int mm, int *frac, const char **units);
+extern double get_depth_units(int mm, int *frac, const char **units);
extern double get_volume_units(unsigned int ml, int *frac, const char **units);
extern double get_temp_units(unsigned int mk, const char **units);
extern double get_weight_units(unsigned int grams, int *frac, const char **units);