fixed small bug..

merge-requests/18/merge
_xeroxz 3 years ago
parent 3365f368a2
commit 1afc55ca84

@ -157,6 +157,11 @@ namespace vm::transform
return _byteswap_ulong( a ); return _byteswap_ulong( a );
if constexpr ( std::is_same_v< T, std::uint16_t > ) if constexpr ( std::is_same_v< T, std::uint16_t > )
return _byteswap_ushort( a ); return _byteswap_ushort( a );
// XCHG AL, AH... the size will be "8 bits" because it only
// looks at the first operand but this is truly a "BSWAP 16"...
// which btw: BSWAP on 16bit registers isnt a thing...
if constexpr ( std::is_same_v< T, std::uint8_t > )
return _byteswap_ushort( a );
throw std::invalid_argument( "invalid type size..." ); throw std::invalid_argument( "invalid type size..." );
}; };

Loading…
Cancel
Save