From c0cc9861f95e494d4c8a6a180bcacdd2b0459e39 Mon Sep 17 00:00:00 2001 From: zinongli <131403964+zinongli@users.noreply.github.com> Date: Sun, 28 Jul 2024 18:22:57 -0400 Subject: [PATCH] fixed issue. add/edit manually live --- t5577_writer.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/t5577_writer.c b/t5577_writer.c index 3c742884695..cfe41dddf5c 100644 --- a/t5577_writer.c +++ b/t5577_writer.c @@ -371,10 +371,16 @@ void uint32_to_byte_buffer(uint32_t block_data, uint8_t byte_buffer[4]) { byte_buffer[3] = block_data & 0xFF; } -uint32_t byte_buffer_to_uint32(const uint8_t byte_buffer[4]) { - return ((uint32_t)(byte_buffer[0] << 24)) ; +uint32_t byte_buffer_to_uint32(uint8_t byte_buffer[4]) { + uint32_t block_data = 0; + block_data |= ((uint32_t)byte_buffer[0] << 24); + block_data |= ((uint32_t)byte_buffer[1] << 16); + block_data |= ((uint32_t)byte_buffer[2] << 8); + block_data |= ((uint32_t)byte_buffer[3]); + return block_data; } + static void t5577_writer_content_byte_input_confirmed(void* context) { T5577WriterApp* app = (T5577WriterApp*)context; T5577WriterModel* my_model = view_get_model(app->view_write);