diff --git a/poincare/src/logarithm.cpp b/poincare/src/logarithm.cpp index d6b9ec414..701874f6a 100644 --- a/poincare/src/logarithm.cpp +++ b/poincare/src/logarithm.cpp @@ -143,7 +143,7 @@ Expression Logarithm::shallowReduce(Context & context, Preferences::AngleUnit an Expression Logarithm::simpleShallowReduce(Context & context, Preferences::AngleUnit angleUnit) { Expression c = childAtIndex(0); // log(0,0)->Undefined - if (numberOfChildren() == 2 && childAtIndex(1).type() == ExpressionNode::Type::Rational && childAtIndex(1).convert().isZero() && static_cast(c).isZero()) { + if (numberOfChildren() == 2 && c.type() == ExpressionNode::Type::Rational && childAtIndex(1).type() == ExpressionNode::Type::Rational && childAtIndex(1).convert().isZero() && static_cast(c).isZero()) { Expression result = Undefined(); replaceWithInPlace(result); return result;