aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-24 15:23:54 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:21 +0100
commit1bff1c8d0bda4b4c80b53251972f8d5bf46dcd98 (patch)
tree250ab33fbd3a8de95ba43563b8127cd95870c2e1 /src
parent1444070936c5be86598125ea3a114dfd6a0ddec0 (diff)
render_hkl: Ignore infinities
Diffstat (limited to 'src')
-rw-r--r--src/render_hkl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/render_hkl.c b/src/render_hkl.c
index f42235d4..44ec23fe 100644
--- a/src/render_hkl.c
+++ b/src/render_hkl.c
@@ -161,7 +161,9 @@ static void draw_circles(signed int xh, signed int xk, signed int xl,
if ( fabs(v) > fabs(*max_v) ) *max_v = fabs(v);
/* Find max value for colour scale */
- if ( fabs(val) > fabs(*max_val) ) {
+ if ( !isnan(val) && !isinf(val)
+ && (fabs(val) > fabs(*max_val)) )
+ {
*max_val = fabs(val);
}