diff options
| author | Ethan Werner <mail@ethanwerner.com> | 2026-08-09 15:02:21 +0400 |
|---|---|---|
| committer | Ethan Werner <mail@ethanwerner.com> | 2026-08-09 15:02:21 +0400 |
| commit | 3d92926a902017e7cf1f5738e99ff62da596ce12 (patch) | |
| tree | 2b55422c26a48759d56fa91f06df24449e9dfa88 /lib/schaff_trend_cycle.c | |
| parent | 07e18043145f3d91c8ea7ec3ad41b3c905585277 (diff) | |
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; |