screen: use empty slice instead of undefined

Use an empty slice instead of undefined for the screen's default buffer.
This prevents segfaults if an app is deinitialized prior to receiving a
winsize event.
This commit is contained in:
Tim Culverhouse 2024-12-23 07:14:40 -06:00
parent dae9016d75
commit 50578e5daf

View file

@ -16,7 +16,7 @@ height: u16 = 0,
width_pix: u16 = 0,
height_pix: u16 = 0,
buf: []Cell = undefined,
buf: []Cell = &.{},
cursor_row: u16 = 0,
cursor_col: u16 = 0,