- 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:
@ -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);
|
||||
|
Reference in New Issue
Block a user