aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFranz Zotter <fzotter@users.sourceforge.net>2006-08-09 19:26:19 +0000
committerFranz Zotter <fzotter@users.sourceforge.net>2006-08-09 19:26:19 +0000
commit5fb8c47ff706b0df164de7b46ea1e4846a5dbf2f (patch)
treef5e64f02a27bcbbb6f0cfad984106fa94a42a72d /src
parent5906c99acec28f3892e0571f6e731653fd6aab34 (diff)
forgot to check in corrections:
mtx_fill didn't work correctly, a condition was wrong. mtx_find didn't check each entry because of a wrong loop condition. svn path=/trunk/externals/iem/iemmatrix/; revision=5540
Diffstat (limited to 'src')
-rw-r--r--src/mtx_fill.c2
-rw-r--r--src/mtx_find.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mtx_fill.c b/src/mtx_fill.c
index 84a022e..90fc7aa 100644
--- a/src/mtx_fill.c
+++ b/src/mtx_fill.c
@@ -296,7 +296,7 @@ static void mTXFillMatrix (MTXfill *mtx_fill_obj, t_symbol *s,
}
break;
case FILL_INDEXED_ELEMENTS:
- if (list_size > mtx_fill_obj->index_size) {
+ if (list_size < mtx_fill_obj->index_size) {
post("mtx_fill: fill matrix smaller than indexing vector");
return;
}
diff --git a/src/mtx_find.c b/src/mtx_find.c
index 8ff2796..b3fe0fe 100644
--- a/src/mtx_find.c
+++ b/src/mtx_find.c
@@ -134,7 +134,7 @@ static int findPreviousNonZero (const int n, t_atom *x, int offset)
static int findPreviousNonZeroStep (const int step, t_atom *x, int offset)
{
x += offset;
- for (; offset > 0; offset-=step, x-=step)
+ for (; offset >= 0; offset-=step, x-=step)
if (atom_getfloat(x))
return offset;
return -1;