mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-28 03:41:41 +00:00
Ensure bounds in add_line()
This commit is contained in:
parent
54b802f1e6
commit
da0309545e
1 changed files with 1 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ def resize_fonts(new_sz):
|
|||
|
||||
def add_line(buf, cell_width, position, thickness, cell_height):
|
||||
y = position - thickness // 2
|
||||
while thickness:
|
||||
while thickness > 0 and y > -1 and y < cell_height - 1:
|
||||
thickness -= 1
|
||||
ctypes.memset(ctypes.addressof(buf) + (cell_width * y), 255, cell_width)
|
||||
y += 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue