Add condition

This commit is contained in:
jl777
2019-04-02 10:19:24 -11:00
parent 2437124f1c
commit 778b70285e

View File

@@ -2340,7 +2340,7 @@ int64_t komodo_pricesmoothed(int64_t *correlated,int32_t daywindow,int64_t *nonz
int32_t i,iter; int64_t smoothedden,smoothedsum,sum,den,smoothed[7],firstprice = correlated[0];
if ( daywindow < 2 )
return(0);
if ( sizeof(smoothed)/sizeof(*smoothed) )
if ( smoothwidth != sizeof(smoothed)/sizeof(*smoothed) )
{
fprintf(stderr,"smoothwidth %d != %d\n",smoothwidth,(int32_t)(sizeof(smoothed)/sizeof(*smoothed)));
return(0);