]> git.llucax.com Git - z.facultad/75.29/dale.git/blobdiff - src/main.cpp
Bugfix (evita potencial pisada de memoria).
[z.facultad/75.29/dale.git] / src / main.cpp
index c573549c3875d6dc3aba52bf37be0303ac2d8225..f9236199f91049f2b570d9465ce837b818461564 100644 (file)
@@ -50,10 +50,10 @@ void procesar(istream& is, ostream& os)
                switch (operador)
                {
                        case '+':
-                               os << op1 + op2 << "\n";
+                               os << (op1 += op2) << "\n";
                                break;
                        case '-':
-                               os << op1 - op2 << "\n";
+                               os << (op1 -= op2) << "\n";
                                break;
                        case '*':
                                os << naif(op1, op2) << "\n";