mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-30 08:24:58 +00:00
Kernel: Fix undefined behavior due to shifting out of bounds
This commit is contained in:
@@ -485,7 +485,7 @@ public:
|
||||
}
|
||||
|
||||
bool is_set(PortInterruptFlag flag) { return m_bitfield & (u32)flag; }
|
||||
void set_at(PortInterruptFlag flag) { m_bitfield = m_bitfield | (1 << (u32)flag); }
|
||||
void set_at(PortInterruptFlag flag) { m_bitfield = m_bitfield | static_cast<u32>(flag); }
|
||||
void clear() { m_bitfield = 0; }
|
||||
bool is_cleared() const { return m_bitfield == 0; }
|
||||
void set_all() { m_bitfield = 0xffffffff; }
|
||||
|
||||
Reference in New Issue
Block a user