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

Pressing the input button more than 4 times while in morse code input mode overwrites menu memory #28

Open
Vertexia57 opened this issue Jul 16, 2024 · 0 comments

Comments

@Vertexia57
Copy link

Pressing the button more than 4 times causes the inputStream array to overflow and write into external data which overwrites the menu data currently, the more times you click it the more menu data gets overridden

Problematic Code: (ProtoTracer/ExternalDevices/InputDevices/SingleButtonMorseHandler.tpp, line 121)

    if (!pinState) { // In Update()
        inputStream[inputCount] = timeOn;
        inputCount += 1; // Can go above 4
    }

Proposed Fix:

    if (!pinState && inputCount < 4) { // In Update()
        inputStream[inputCount] = timeOn;
        inputCount += 1; // Can go above 4
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant