summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2009-08-06 16:15:56 +0200
committerSven Verdoolaege <skimo@kotnet.org>2009-08-07 12:52:43 +0200
commit15b829fd4f5a937541acac277ef097a6e3738775 (patch)
tree8133e1026cba7199e8cd801267102da453c6e9cf
parent9865fa3e0f6330102012579648efc723bf051594 (diff)
downloadisl-15b829fd4f5a937541acac277ef097a6e3738775.tar.gz
isl-15b829fd4f5a937541acac277ef097a6e3738775.tar.bz2
isl-15b829fd4f5a937541acac277ef097a6e3738775.zip
isl_mat_extend: make sure the number of rows never decreases
-rw-r--r--isl_mat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/isl_mat.c b/isl_mat.c
index c1ba26e4..c96017ed 100644
--- a/isl_mat.c
+++ b/isl_mat.c
@@ -57,6 +57,8 @@ struct isl_mat *isl_mat_extend(struct isl_mat *mat,
if (mat->max_col < n_col) {
struct isl_mat *new_mat;
+ if (n_row < mat->n_row)
+ n_row = mat->n_row;
new_mat = isl_mat_alloc(mat->ctx, n_row, n_col);
if (!new_mat)
goto error;