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

Index overflow in ZUNO_GFX::drawPixel #11

Open
Cyberax opened this issue Sep 25, 2023 · 0 comments
Open

Index overflow in ZUNO_GFX::drawPixel #11

Cyberax opened this issue Sep 25, 2023 · 0 comments
Assignees

Comments

@Cyberax
Copy link

Cyberax commented Sep 25, 2023

ZUNO_GFX::drawPixel uses 8 bits to represent the offset in the pixel array, so it will overflow for any but the smallest displays:

https://github.com/Z-Wave-Me/Z-Uno-G2-Core/blob/d25fc71f97bf91d1bd268c386150adbd4a60b3b1/hardware/arduino/zunoG2/libraries/ZUNO_GFX/ZUNO_GFX.cpp#L37C44-L37C44

Replacing uint8_t with uint16_t fixes the issue.

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

2 participants