Skip to content

Conversation

@fakefred
Copy link

@fakefred fakefred commented Nov 5, 2025

In EPD_7in5_V2.c, the function EPD_7IN5_V2_Display_Part has this line which tells the EPD the maximum X coordinate of the box it's refreshing:

EPD_SendData (x_end%256-1);  //x-end

When x_end is a multiple of 256, x_end%256-1 would evaluate to -1, then it would be cast to an unsigned byte. This would lead to an integer underflow. This problem is also present in the Y coordinate, and in the driver code for 7.5B. The _old drivers, however, do not have this problem.

The solution is to change the line to

EPD_SendData ((x_end-1)%256);  //x-end

Thank you for reviewing!

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

Successfully merging this pull request may close these issues.

1 participant