]> git.llucax.com Git - z.facultad/75.29/dale.git/blobdiff - src/main.cpp
Bugfix en esMenorEnModuloQue que hacia que se viole el segmento.
[z.facultad/75.29/dale.git] / src / main.cpp
index c573549c3875d6dc3aba52bf37be0303ac2d8225..3148ce2b36e1913890f797c047f6260a51512534 100644 (file)
@@ -43,17 +43,17 @@ void procesar(istream& is, ostream& os)
        {
                istringstream iss(linea.c_str());
                char operador;
-               string str_op1, str_operador, str_op2;
+               string str_op1, str_op2;
                iss >> str_op1 >> operador >> str_op2;
                number<> op1 = str_op1;
                number<> op2 = str_op2;
                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";