From: Sven Verdoolaege Date: Sat, 3 Oct 2009 13:01:56 +0000 (+0200) Subject: fix long standing bug in isl_mat_inverse_product X-Git-Tag: isl-0.02~278 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e966293490482fa0d9b82d1b267a59249761686;p=platform%2Fupstream%2Fisl.git fix long standing bug in isl_mat_inverse_product --- diff --git a/isl_mat.c b/isl_mat.c index 1479993..3b92458 100644 --- a/isl_mat.c +++ b/isl_mat.c @@ -603,11 +603,11 @@ struct isl_mat *isl_mat_inverse_product(struct isl_mat *left, isl_int_gcd(a, left->row[row][row], left->row[i][row]); isl_int_divexact(b, left->row[i][row], a); isl_int_divexact(a, left->row[row][row], a); - isl_int_neg(a, a); - isl_seq_combine(left->row[i]+row, - a, left->row[i]+row, - b, left->row[row]+row, - left->n_col-row); + isl_int_neg(b, b); + isl_seq_combine(left->row[i] + i, + a, left->row[i] + i, + b, left->row[row] + i, + left->n_col - i); isl_seq_combine(right->row[i], a, right->row[i], b, right->row[row], right->n_col); }