From 30ed8c15989f7ecf4fef53e90a4f6c7b6aa355bc Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Thu, 8 Sep 2022 23:39:50 +0300 Subject: [PATCH] Fix MFClassic 4k reading - OFW PR 1712 PR by Astrrra --- furi/core/core_defines.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/furi/core/core_defines.h b/furi/core/core_defines.h index 801810f6a..487fe2ca3 100644 --- a/furi/core/core_defines.h +++ b/furi/core/core_defines.h @@ -85,7 +85,11 @@ extern "C" { #endif #ifndef FURI_BIT_SET -#define FURI_BIT_SET(x, n) ((x) |= (1 << (n))) +#define FURI_BIT_SET(x, n) \ + ({ \ + __typeof__(x) _x = (1); \ + (x) |= (_x << (n)); \ + }) #endif #ifndef FURI_BIT_CLEAR