diff --git a/poincare/src/power.cpp b/poincare/src/power.cpp index 6850feed9..f2e877fe8 100644 --- a/poincare/src/power.cpp +++ b/poincare/src/power.cpp @@ -151,7 +151,7 @@ void Power::immediateSimplify() { } // x^1 if (b->isOne()) { - replaceWith(new Rational(Integer(1), true)); + replaceWith(const_cast(operand(0)), true); return; } // p^q with p, q rationals