Skip to content

Commit

Permalink
Fix allocation bug for bs!=1 in dFSMatSetValuesBlockedExpanded()
Browse files Browse the repository at this point in the history
  • Loading branch information
jedbrown committed Apr 21, 2011
1 parent cfb3f7b commit 4787838
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fs/interface/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,8 @@ dErr dFSMatSetValuesBlockedExpanded(dFS fs,Mat A,dInt m,const dInt idxm[],dInt n
}
if (lm > 128) {err = dMallocA(lm,&lidxm);dCHK(err);}
if (ln > 128) {err = dMallocA(ln,&lidxn);dCHK(err);}
if (lm*ln > 1024) {err = dMallocA(lm*ln,&lv);dCHK(err);}
if (m*ln > 1024) {err = dMallocA(lm*n,&lvt);dCHK(err);}
if (lm*ln*bs*bs > 1024) {err = dMallocA(lm*ln*bs*bs,&lv);dCHK(err);}
if (m*ln*bs*bs > 1024) {err = dMallocA(lm*n*bs*bs,&lvt);dCHK(err);}

/* Expand columns into temporary matrix \a lvt */
for (j=0,lj=0; j<n; j++) { /* columns in input matrix */
Expand Down

0 comments on commit 4787838

Please sign in to comment.