From 3db384424bd7398ffbb7a355cab8f15f3add009f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 2 Oct 2016 19:24:58 +0200 Subject: New upstream version 1.9.1+repack --- spectro/dispread.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'spectro/dispread.c') diff --git a/spectro/dispread.c b/spectro/dispread.c index 8a78fcc..4c96b76 100644 --- a/spectro/dispread.c +++ b/spectro/dispread.c @@ -271,7 +271,7 @@ int main(int argc, char *argv[]) { /* 0X = use current color management cLut (MadVR) */ /* 1X = disable color management cLUT (MadVR) */ double cal[3][MAX_CAL_ENT]; /* Display calibration */ - int ncal = 256; /* number of cal entries used */ + int ncal = 256; /* Default number of cal entries used */ cgats *icg; /* input cgats structure */ cgats *ocg; /* output cgats structure */ time_t clk = time(0); @@ -572,7 +572,7 @@ int main(int argc, char *argv[]) { fa = nfa; if (na == NULL) usage(0,"Parameter expected after -W"); if (na[0] == 'n' || na[0] == 'N') - fc = fc_none; + fc = fc_None; else if (na[0] == 'h' || na[0] == 'H') fc = fc_Hardware; else if (na[0] == 'x' || na[0] == 'X') @@ -855,8 +855,9 @@ int main(int argc, char *argv[]) { if ((ncal = ccg->t[0].nsets) <= 0) error ("No data in set of file '%s'",calname); - if (ncal != 256) - error ("Expect 256 data sets in file '%s'",calname); + if (ncal < 2 || ncal > MAX_CAL_ENT) + error("Data set size %d is out of range for '%s'",ncal,calname); + if (ncal > MAX_CAL_ENT) error ("Cant handle %d data sets in file '%s', max is %d",ncal,calname,MAX_CAL_ENT); -- cgit v1.2.3