]> www.ginac.de Git - ginac.git/blobdiff - ginac/add.cpp
fixed a bug where quo() would call vector::reserve() with a negative argument
[ginac.git] / ginac / add.cpp
index 279933d3ecb3f907e1940e4ebeee83357aefb0c1..3a7a9126db69f03209f2bb90bafcd8f1574acf3e 100644 (file)
@@ -159,10 +159,8 @@ void add::print(const print_context & c, unsigned level) const
        } else if (is_a<print_python_repr>(c)) {
 
                c.s << class_name() << '(';
-               unsigned end = nops();
-               if (end)
-                       op(0).print(c);
-               for (unsigned i=1; i<end; ++i) {
+               op(0).print(c);
+               for (unsigned i=1; i<nops(); ++i) {
                        c.s << ',';
                        op(i).print(c);
                }