From 1f2c779bd590b601411ed862359120525ff63949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Koek?= Date: Mon, 8 Apr 2024 19:46:09 +0100 Subject: [PATCH] Update ebyte_lora.cpp --- esphome/components/ebyte_lora/ebyte_lora.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/esphome/components/ebyte_lora/ebyte_lora.cpp b/esphome/components/ebyte_lora/ebyte_lora.cpp index f7cb751399..2df63d6615 100644 --- a/esphome/components/ebyte_lora/ebyte_lora.cpp +++ b/esphome/components/ebyte_lora/ebyte_lora.cpp @@ -350,9 +350,8 @@ void EbyteLoraComponent::loop() { } if (data[0] == PROGRAM_CONF) { ESP_LOGD(TAG, "GOT PROGRAM_CONF"); - auto *sbuff = reinterpret_cast(&data); memset(&this->config, 0, sizeof(RegisterConfig)); - memcpy(&this->config, sbuff, sbuff->length); + memcpy(&this->config, &data[0], sizeof(RegisterConfig)); set_mode_(NORMAL); } }