Skip to content

Fixed a crash when trying to calculate a single space as input

Johannes Schiller requested to merge sydmontague/kcalc:fixSpaceCrash into master

Entering a single space would immediately crash the calculator.

The parser doesn't add spaces into the token queue, so when the calculation fails and tries to set the cursor to where the offending token starts, it will crash since no token exist at all.

The patch simply catches the special case of an empty queue.

Merge request reports