Usbac / quich

Just an advanced terminal calculator.
MIT License
71 stars 12 forks source link

wrong answer when I put two minus signs #14

Closed ha2san closed 3 years ago

ha2san commented 3 years ago

Hi when I put "3--2" as input I receive a bad answer example :

$ ./quich "3--2" -vvv
Tokens > '3' '-' '-' '2' 
Posfix > 3 - 2 - 
Result > -5

expected output: 5 or warning

Usbac commented 3 years ago

Thank you! It has been fixed and some additional tests were added. 😃

6ec38a92461536d11a2c837a6cfd1076e3220583