mirror of
https://github.com/ndeadly/MissionControl
synced 2024-11-23 04:43:10 +00:00
mc.mitm: reverse bluetooth address using temporary var of correct size to keep compiler happy
This commit is contained in:
parent
6268edb113
commit
4f5cb51c1e
1 changed files with 3 additions and 1 deletions
|
@ -34,7 +34,9 @@ namespace ams::bluetooth::core {
|
|||
os::Event g_data_read_event(os::EventClearMode_AutoClear);
|
||||
|
||||
bluetooth::Address ReverseBluetoothAddress(bluetooth::Address address) {
|
||||
uint64_t tmp = util::SwapEndian48(*reinterpret_cast<uint64_t *>(&address));
|
||||
uint64_t tmp;
|
||||
std::memcpy(&tmp, &address, sizeof(address));
|
||||
tmp = util::SwapEndian(tmp) >> 16;
|
||||
return *reinterpret_cast<bluetooth::Address *>(&tmp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue