calculator: fix calculating with no operators

Authored by sandsmark on Sep 24 2017, 12:40 PM.