diff options
author | Franz Zotter <fzotter@users.sourceforge.net> | 2006-08-09 20:00:28 +0000 |
---|---|---|
committer | Franz Zotter <fzotter@users.sourceforge.net> | 2006-08-09 20:00:28 +0000 |
commit | 118daf1842468f285add10669a09f2b5f8218591 (patch) | |
tree | a3446a3b46334dd9276a1b1e7165e302d2be2854 /src | |
parent | 5fb8c47ff706b0df164de7b46ea1e4846a5dbf2f (diff) |
bug corrected: the new "size" command was crashing with uninitialized matrix.
svn path=/trunk/externals/iem/iemmatrix/; revision=5541
Diffstat (limited to 'src')
-rw-r--r-- | src/mtx_matrix.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mtx_matrix.c b/src/mtx_matrix.c index 1df3db4..277b7ac 100644 --- a/src/mtx_matrix.c +++ b/src/mtx_matrix.c @@ -165,11 +165,12 @@ void matrix_set(t_matrix *x, t_float f) void matrix_size(t_matrix *x, t_symbol *s, int argc, t_atom *argv) { - int col, row, size=x->row*x->col; + int col, row; switch(argc) { case 0: /* size */ - outlet_list(x->x_obj.ob_outlet, gensym("size"), 2, x->atombuffer); + if (x->row*x->col) + outlet_list(x->x_obj.ob_outlet, gensym("size"), 2, x->atombuffer); break; case 1: row=atom_getfloat(argv); |