aboutsummaryrefslogtreecommitdiff
path: root/src/im-zmq.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-04-02 16:02:48 +0200
committerThomas White <taw@physics.org>2019-04-02 16:02:48 +0200
commit8b3f748a90421152b364be5170415ee4e0a3b329 (patch)
tree6fcf309e94ef73d5f9fa5f87d7411109fafd0f26 /src/im-zmq.c
parent41d7eef061eab1eac8d08721b263bcc92c174179 (diff)
zmq: Consider pixel as bad if its value is NaN or infinity
Diffstat (limited to 'src/im-zmq.c')
-rw-r--r--src/im-zmq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/im-zmq.c b/src/im-zmq.c
index f5e2793d..7e8bd9ac 100644
--- a/src/im-zmq.c
+++ b/src/im-zmq.c
@@ -336,6 +336,8 @@ static int unpack_slab(struct image *image, double *data,
bad = 1;
}
+ if ( isnan(data[idx]) || isinf(data[idx]) ) bad = 1;
+
if ( flags != NULL ) {
int f;