From 8b2a6f62b341e115d19309a4fa8aef8dfa5d29e1 Mon Sep 17 00:00:00 2001 From: Vesa Oikonen <vesoik@utu.fi> Date: Tue, 26 Sep 2017 12:42:40 +0300 Subject: [PATCH] even more robust data_type check --- v1/libtpcimgio/ecat63r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v1/libtpcimgio/ecat63r.c b/v1/libtpcimgio/ecat63r.c index 18fc5551..3fcdb0e3 100644 --- a/v1/libtpcimgio/ecat63r.c +++ b/v1/libtpcimgio/ecat63r.c @@ -67,7 +67,7 @@ int ecat63ReadMainheader( if(!little) swabip(buf+50, 2); memcpy(&h->data_type, buf+50, 2); if(ECAT63_TEST>10) printf("main_header.data_type=%d\n", h->data_type); - if(h->data_type==-1) { + if(h->data_type<1) { if(ECAT63_TEST>1) printf("invalid data_type; assuming VAX_I2\n"); h->data_type=VAX_I2; } -- GitLab