- Fixed a bug in histmem.c which could casue core dumps if the user did

not give at least one time channel
This commit is contained in:
cvs
2003-08-28 07:02:44 +00:00
parent b705faa78e
commit 790d5c217a

View File

@ -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);