diff --git a/nx/include/switch/services/nfc.h b/nx/include/switch/services/nfc.h index b07a87ed..8b9e95e7 100644 --- a/nx/include/switch/services/nfc.h +++ b/nx/include/switch/services/nfc.h @@ -144,7 +144,7 @@ typedef struct { /// Nfc/Nfp DeviceHandle typedef struct { - u64 handle; ///< Handle. + u8 handle[0x8]; ///< Handle. } NfcDeviceHandle; /** diff --git a/nx/source/services/nfc.c b/nx/source/services/nfc.c index d5c1bc1f..3c429af9 100644 --- a/nx/source/services/nfc.c +++ b/nx/source/services/nfc.c @@ -189,7 +189,7 @@ static Result _nfcCmdNoInOutU8(Service* srv, u8 *out, u32 cmd_id) { static Result _nfcCmdNoInOutBool(Service* srv, bool *out, u32 cmd_id) { u8 tmp=0; Result rc = _nfcCmdNoInOutU8(srv, &tmp, cmd_id); - if (R_SUCCEEDED(rc) && out) *out = tmp!=0; + if (R_SUCCEEDED(rc) && out) *out = tmp & 1; return rc; } @@ -307,7 +307,7 @@ Result nfpCreateApplicationArea(const NfcDeviceHandle *handle, u32 app_id, const const struct { NfcDeviceHandle handle; u32 app_id; - } PACKED in = { *handle, app_id }; + } in = { *handle, app_id }; serviceAssumeDomain(&g_nfpInterface); return serviceDispatchIn(&g_nfpInterface, 12, in,