Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numpad bugfixes #2856

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kisslorand
Copy link
Contributor

@kisslorand kisslorand commented Oct 7, 2023

This PR deals with some bugs in the numpad.

The bugs:

  1. In float input mode if the decimal button (".") is pressed first than the numpad would not respond to it and by exiting with "OK" the "0" value would be saved as new value.
  2. In float input mode if original value is 0 (zero) than pressing the "Reset" button the reset value will have no decimal value even if it has decimal values specified in the function call.
  3. In float input mode if the parameter value is big enough (ex. 12345.67) than the maximum character number is not respected and a number of 12345.67xxx format is used, where "xxx" are random numbers found in the memory. If this number is edited than it results in memory corruption.
  4. If no title is specified (ex. minimum an maximum values) when calling the numpad function the title will refer to a pointer that is deallocated at the time of using the data at that memory location. It can lead to an unpredictable behaviour. It is something a programmer should just simply not do.

The fixes:

  1. If the decimal button (".") is pressed first it is handled properly, the display will show "0." as the current number.
  2. In float input mode if original value is 0 (zero) than pressing the "Reset" button the reset value will will have all it's decimals specified.
  3. Character numbers limitation in float input mode is handled properly, no memory corruption occurs.
  4. Title pointer location is always allocated at the time of usage and properly deallocated (if needed) at the exit from the function.

Note

Some other changes were made too with the purpose of FW size reduction to balance the FW size increase resulted from the bugfixes.

@kisslorand kisslorand changed the title Nunpad bugfixes Numpad bugfixes Oct 7, 2023
@kisslorand kisslorand force-pushed the Numpad-fix branch 7 times, most recently from bbe4506 to c919897 Compare October 8, 2023 13:40
@kisslorand kisslorand force-pushed the Numpad-fix branch 7 times, most recently from 1def8c8 to 0f73dbf Compare November 7, 2023 05:08
Copy link

This PR has been automatically marked as stale because it has had no activity for the last 60 days. It will be closed in 7 days if no further activity occurs. Thank you for your contribution.

@github-actions github-actions bot added the Stale label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant