Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vneiger committed Oct 11, 2023
1 parent 4108bc7 commit b57f2c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/nmod_poly.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void nmod_poly_one(nmod_poly_t res)
res->coeffs[0] = 1;
}

void nmod_poly_set_trunc(nmod_poly_t res, const nmod_poly_t poly, slong n);
void nmod_poly_set_trunc(nmod_poly_t res, const nmod_poly_t poly, slong len);

NMOD_POLY_INLINE
void nmod_poly_truncate(nmod_poly_t poly, slong len)
Expand Down
6 changes: 3 additions & 3 deletions src/nmod_poly/set_trunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ nmod_poly_set_trunc(nmod_poly_t res, const nmod_poly_t poly, slong len)
{
if (poly == res)
{
if (poly->length > len)
if (res->length > len)
{
poly->length = len;
_nmod_poly_normalise(poly);
res->length = len;
_nmod_poly_normalise(res);
}
}
else
Expand Down

0 comments on commit b57f2c6

Please sign in to comment.