ext/numo/narray/gen/tmpl/each_with_index.c in numo-narray-0.9.1.0 vs ext/numo/narray/gen/tmpl/each_with_index.c in numo-narray-0.9.1.1

- old
+ new

@@ -21,11 +21,12 @@ VALUE *a; size_t *c; int nd, md; c = (size_t*)(lp->opt_ptr); - nd = lp->ndim - 1; - md = lp->ndim + 1; + nd = lp->ndim; + if (nd > 0) {nd--;} + md = nd + 2; a = ALLOCA_N(VALUE,md); INIT_COUNTER(lp, i); INIT_PTR_IDX(lp, 0, p1, s1, idx1); c[nd] = 0;