Changeset 71f276 in git


Ignore:
Timestamp:
Sep 26, 2019, 2:48:03 PM (5 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
2574a6f0f5bbc739d3f3b8ef45f4bc19de2f03b9
Parents:
933f60e6d6c0e0f2cf64312957459d781e2153f4
Message:
Fix crash in lp_subst
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/shiftop.cc

    r933f60 r71f276  
    600600  int lV = r->isLPring;
    601601
    602   number m1Coeff = pGetCoeff(m1);
     602  number m1Coeff = n_Copy(pGetCoeff(m1), r->cf); // important to copy
    603603
    604604  int hole = lV * at;
     
    803803poly p_mLPSubst(poly m, int n, poly e, const ring r)
    804804{
     805  assume(p_GetComp(e, r) == 0);
    805806  if (m == NULL) return NULL;
    806807
     
    810811  poly res = p_One(r);
    811812  poly remaining = p_Head(m, r);
     813  p_SetComp(res, p_GetComp(remaining, r), r);
     814  p_SetComp(remaining, 0, r);
    812815  for (int i = 0; i < degbound; i++)
    813816  {
     
    818821
    819822      poly left = p_GetExp_k_n(remaining, startOfBlock, r->N, r);
    820       p_SetCoeff(left, p_GetCoeff(remaining, r), r);
     823      p_SetCoeff(left, n_Copy(p_GetCoeff(remaining, r), r->cf), r);
    821824      p_mLPunshift(left, r);
    822825
Note: See TracChangeset for help on using the changeset viewer.