diff options
Diffstat (limited to 'lib/schaff_trend_cycle.c')
| -rw-r--r-- | lib/schaff_trend_cycle.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/schaff_trend_cycle.c b/lib/schaff_trend_cycle.c index f4584e6..0ff3e1c 100644 --- a/lib/schaff_trend_cycle.c +++ b/lib/schaff_trend_cycle.c @@ -35,9 +35,8 @@ int ts_schaff_trend_cycle( { TS_PROLOGUE( ts_schaff_trend_cycle_p ); if ( !c ) return -1; - uint_t period = ((ts_schaff_trend_cycle_params_t *)c)->period; + uint_t period = ((ts_schaff_trend_cycle_params_t const *)c)->period; if (period == 0) period = 3; - if (n == 0) return -1; if (period > n) { for (uint_t j = 0; j < n; ++j) { y[0][j] = 0; y[1][j] = 0; } return 0; } uint_t fast = 10; |