err: fix narrowing conversion

This commit is contained in:
Michael Scire 2020-12-03 12:53:20 -08:00
parent 422e9434d8
commit d2f48d5e36

View File

@ -82,7 +82,7 @@ namespace ams::err {
}
/* Check the descriptor value. */
const ContextDescriptor descriptor{reserved & ~0x200};
const ContextDescriptor descriptor{static_cast<decltype(ContextDescriptor{}.value)>(reserved & ~0x200)};
if (!(impl::ContextDescriptorMin <= descriptor && descriptor <= impl::ContextDescriptorMax)) {
return InvalidContextDescriptor;
}