diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-10-02 19:25:17 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-10-02 19:25:17 +0200 |
commit | c2ca7be5a751879159f3cb591a64bb9568b79762 (patch) | |
tree | 04e38d4f4a2aad4d789bda0a65b7abb80a3439a2 /spectro/dispread.c | |
parent | 45c152c326d87478fbf41714b4b8e2f7b57a282b (diff) | |
parent | 3db384424bd7398ffbb7a355cab8f15f3add009f (diff) |
Updated version 1.9.1+repack from 'upstream/1.9.1+repack'
with Debian dir 98a996367aa69ae41accf9c6d369f600bc94de80
Diffstat (limited to 'spectro/dispread.c')
-rw-r--r-- | spectro/dispread.c | 9 |
1 files changed, 5 insertions, 4 deletions
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); |