From b09128c3aac9d027afebe86fd52806b7520b9185 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Mon, 16 Apr 2012 12:15:44 +0200 Subject: [PATCH] polynomial inversion fix --- lib/polynomial.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/polynomial.cpp b/lib/polynomial.cpp index 50df8ef..bbab890 100644 --- a/lib/polynomial.cpp +++ b/lib/polynomial.cpp @@ -355,9 +355,8 @@ void polynomial::divmod (polynomial&d, polynomial&res, polynomial&rem, gf2m&fld) void polynomial::inv (polynomial&m, gf2m&fld) { polynomial a = *this; - this->resize (2); - item (0) = 0; - item (1) = 1; + this->resize (1); + item (0) = 1; div (a, m, fld); }