diff --git a/histmem.c b/histmem.c index f1888e00..50552672 100644 --- a/histmem.c +++ b/histmem.c @@ -1497,7 +1497,6 @@ static int checkHMEnd(pHistMem self, char *text){ SCWrite(pCon,pBueffel,eError); return 0; } - /* do it */ if(iNum >= MAXCHAN) { SCWrite(pCon, @@ -1505,6 +1504,11 @@ static int checkHMEnd(pHistMem self, char *text){ eError); return 0; } + if(iNum <= 0){ + SCWrite(pCon,"ERROR: at least one time bin required!",eError); + return 0; + } + /* do it */ genTimeBinning(self->pDriv->data, (float)dStart,(float)dStep,iNum); SCparChange(pCon);