diff options
author | Nicu Badescu <badescunicu@yahoo.com> | 2014-03-01 01:38:42 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-28 16:32:01 -0800 |
commit | b3c0f8938dd0fdb8b2d7894841fddeec70f90f9c (patch) | |
tree | 1eccd3e72cbd9778f32b92a58671f436a15315f0 /dive.c | |
parent | a8bce0bb9f8c9a9140714b2381f139c45aeaeb29 (diff) | |
download | subsurface-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.c')
-rw-r--r-- | dive.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |