term.ui,os.notify: fix .ctrl being stuck in examples/term.ui/event_viewer.v (regression happened in e9a3817a from 2023-02-20)

This commit is contained in:
Delyan Angelov 2023-10-09 14:03:38 +03:00
parent 169a6b5ce0
commit 121fa0e92d
No known key found for this signature in database
GPG key ID: 66886C0F12D595ED
6 changed files with 10 additions and 8 deletions

View file

@ -140,7 +140,7 @@ fn (mut en EpollNotifier) close() ! {
// event_mask_to_flag is a helper function that converts a bitmask
// returned by epoll_wait to FdEventType
fn event_mask_to_flag(mask u32) FdEventType {
mut flags := FdEventType.read
mut flags := unsafe { FdEventType(0) }
if mask & notify.epoll_read != 0 {
flags.set(.read)