From a5dedec00ab132025e3be51870459433aec3c187 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Wed, 1 Oct 2025 02:34:46 +0300 Subject: [PATCH] ensure correct byte shifts --- .../main/subghz/helpers/subghz_txrx_create_protocol_key.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/main/subghz/helpers/subghz_txrx_create_protocol_key.c b/applications/main/subghz/helpers/subghz_txrx_create_protocol_key.c index 5a7e07e0e..783273e6b 100644 --- a/applications/main/subghz/helpers/subghz_txrx_create_protocol_key.c +++ b/applications/main/subghz/helpers/subghz_txrx_create_protocol_key.c @@ -422,7 +422,8 @@ void subghz_txrx_gen_serial_gangqi(uint64_t* result_key) { // Add bytesum to the end // serial | const_and_button - *result_key = (serial << 18) | (const_and_button << 10) | (bytesum << 2); + *result_key = ((uint64_t)serial << 18) | ((uint64_t)const_and_button << 10) | + ((uint64_t)bytesum << 2); } void subghz_txrx_gen_key_marantec(uint64_t* result_key) {