diff --git a/sadc.c b/sadc.c index d2e2cdfe..160f9c57 100644 --- a/sadc.c +++ b/sadc.c @@ -925,11 +925,11 @@ void open_ofile(int *ofd, char ofile[], int restart_mark) */ goto append_error; - if (!file_act[i].nr || !file_act[i].nr2 || + if ((file_act[i].nr <= 0) || (file_act[i].nr2 <= 0) || (file_act[i].nr > act[p]->nr_max) || (file_act[i].nr2 > NR2_MAX)) { /* - * Number of items and subitems should never be null, + * Number of items and subitems should never be zero (or negative) * or greater than their upper limit. */ goto append_error;