sysprog21 / mado

A window system for resource-constrained devices
MIT License
39 stars 14 forks source link

calc: Set maximum digit length to 9 #35

Closed Bennctu closed 2 months ago

Bennctu commented 2 months ago

According to #25, we find that the input number is random if the digits of the number is larger than 9 digits. The type of calc->stack[0] is int, and the maximum value for an int is 2,147,483,647. Conservatively, we ensure that when the length reaches 9 digits, pressing the digit button will not increase the number of digits.

Screen Recording 2024-08-22 151523

jserv commented 2 months ago

Thank @Bennctu for contributing. I amended the git commit message. See https://cbea.ms/git-commit/ for improving.