Prevent potential math overflow in new profile

Test for max_temp == min_temp to prevent math overflow when calculating
temperature axis in new profile

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2014-01-21 21:43:07 +01:00 committed by Dirk Hohndel
parent 4159faa950
commit 2f822ec0dc
3 changed files with 46 additions and 1 deletions

2
dive.h
View file

@ -20,6 +20,8 @@
(void) (&_max1 == &_max2); \
_max1 > _max2 ? _max1 : _max2; })
#define IS_FP_SAME(_a,_b) (abs((_a) - (_b)) < 0.000001)
#include <libxml/tree.h>
#include <libxslt/transform.h>