base: fix conversion error in Bitset_2::get()

Ref genodelabs/genode#4753
This commit is contained in:
Stefan Kalkowski 2023-02-07 13:35:41 +01:00 committed by Christian Helmuth
parent 0212f94809
commit da0dbd901c

View File

@ -276,7 +276,8 @@ struct Genode::Bitset_2
template <typename T>
static inline access_t get(T const reg)
{
return Bits_0::get(reg) | (Bits_1::get(reg) << Bits_0::WIDTH);
return (access_t)
(Bits_0::get(reg) | (Bits_1::get(reg) << Bits_0::WIDTH));
}
};