fix stupid memory problem.
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 14 Mar 2001 21:30:16 +0000 (21:30 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 14 Mar 2001 21:30:16 +0000 (21:30 +0000)
check/exam_misc.cpp

index 3b2ff8e..c9872a9 100644 (file)
 static unsigned exam_expand_subs(void)
 {
        unsigned result = 0;
-       symbol a1("a1");
        symbol a[VECSIZE];
        ex e, aux;
        
-       a[1] = a1;
-       for (unsigned i=0; i<VECSIZE; ++i) {
+       for (unsigned i=0; i<VECSIZE; ++i)
                e = e + a[i];
-       }
        
        // prepare aux so it will swallow anything but a1^2:
        aux = -e + a[0] + a[1];
        e = expand(subs(expand(pow(e, 2)), a[0] == aux));
        
-       if (e != pow(a1,2)) {
+       if (e != pow(a[1],2)) {
                clog << "Denny Fliegner's quick consistency check erroneously returned "
                     << e << "." << endl;
                ++result;