From 3fe508ed633583fff7e62f7941b03f36cb771678 Mon Sep 17 00:00:00 2001 From: Cyrille Henry Date: Wed, 4 Feb 2015 16:40:58 +0000 Subject: debug crash when factor=0 svn path=/trunk/externals/nusmuk/; revision=17423 --- nusmuk-utils/tab_upsample.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nusmuk-utils/tab_upsample.c') diff --git a/nusmuk-utils/tab_upsample.c b/nusmuk-utils/tab_upsample.c index 36d2188..bb32d6e 100644 --- a/nusmuk-utils/tab_upsample.c +++ b/nusmuk-utils/tab_upsample.c @@ -36,6 +36,8 @@ void tab_upsample_compute(t_tab_upsample *x) int nb_max, i, index_dst; + x->factor = MAX(x->factor, 1); + if (!(a_src = (t_garray *)pd_findbyclass(x->x_arrayname_src, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src->s_name); else if (!garray_getfloatwords(a_src, &npoints_src, &vec_src)) -- cgit v1.2.1