Skip to content

Commit

Permalink
kernel: fix Z(6,3) segfaulting
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored and markuspf committed Dec 21, 2016
1 parent a8ddedb commit d3baa77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/finfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,10 @@ Obj FuncZ2 ( Obj self, Obj p, Obj d)
{
/* get the finite field */
ff = FiniteField( ip, id );


if (ff == 0)
ErrorMayQuit("Z: <q> must be a positive prime power", 0, 0);

/* make the root */
return NEW_FFE( ff, (ip == 2 && id == 1 ? 1 : 2) );
}
Expand Down
4 changes: 4 additions & 0 deletions tst/teststandard/bugfix.tst
Original file line number Diff line number Diff line change
Expand Up @@ -3152,6 +3152,10 @@ gap> Length(oe.vectors); Length(oe.solutions);
159
0

# 2016/12/20 (MH)
gap> Z(6,3);
Error, Z: <q> must be a positive prime power

#############################################################################
gap> STOP_TEST( "bugfix.tst", 831990000);

Expand Down

0 comments on commit d3baa77

Please sign in to comment.