]> www.ginac.de Git - ginac.git/blobdiff - ginac/matrix.cpp
- Fixed a memory corruption in matrix::determinant_minor().
[ginac.git] / ginac / matrix.cpp
index 3e0eeaf84ded4d106b4070856c2ca91020046400..d6091aa4c1b568c18cdcde9f0944160724e4df1e 100644 (file)
@@ -902,7 +902,7 @@ ex matrix::determinant_minor(void) const
                                if (Pkey[fc-1]<fc+c)
                                        break;
                        }
-                       if (fc<n-c)
+                       if (fc<n-c && fc>0)
                                for (unsigned j=fc; j<n-c; ++j)
                                        Pkey[j] = Pkey[j-1]+1;
                } while(fc);