[lcd] forbid writing outside of current framebuffer memory
This commit is contained in:
parent
ee3249beca
commit
c9b90a679e
|
@ -139,6 +139,9 @@ static void display_write_data_byte_framebuffer(uint8_t code)
|
|||
if (display_current_frame >= DISPLAY_FRAMES_AVAILABLE)
|
||||
return;
|
||||
|
||||
if (((int) des.cursor_offset >= 32) || ((int) des.cursor_offset < 0))
|
||||
return;
|
||||
|
||||
display_framebuffer[16*2*display_current_frame + des.cursor_offset] = (char) code;
|
||||
des.cursor_offset += des.next ? -1 : 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue