Permalink
Browse files

Make nmod_poly_fread set the mod to the value from the file (re-init).

  • Loading branch information...
1 parent e90c05e commit df6336f9e6c23d893df25499f618285c7ec5cbac @TomMD TomMD committed Mar 28, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 nmod_poly/fread.c
View
@@ -36,7 +36,9 @@ int nmod_poly_fread(FILE * f, nmod_poly_t poly)
if (fscanf(f, "%ld %lu", &length, &n) != 2)
return 0;
-
+
+ nmod_poly_clear(poly);
+ nmod_poly_init(poly,n);
nmod_poly_fit_length(poly, length);
poly->length = length;

0 comments on commit df6336f

Please sign in to comment.