From 778b70285efca1d9aab687f007644c638ae9be4b Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 2 Apr 2019 10:19:24 -1100 Subject: [PATCH] Add condition --- src/komodo_gateway.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index afa3b40c1..d0539426e 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -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);