Skip to content

Commit c0cc986

Browse files
committed
fixed issue. add/edit manually live
1 parent 6a752e9 commit c0cc986

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

t5577_writer.c

+8-2
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,16 @@ void uint32_to_byte_buffer(uint32_t block_data, uint8_t byte_buffer[4]) {
371371
byte_buffer[3] = block_data & 0xFF;
372372
}
373373

374-
uint32_t byte_buffer_to_uint32(const uint8_t byte_buffer[4]) {
375-
return ((uint32_t)(byte_buffer[0] << 24)) ;
374+
uint32_t byte_buffer_to_uint32(uint8_t byte_buffer[4]) {
375+
uint32_t block_data = 0;
376+
block_data |= ((uint32_t)byte_buffer[0] << 24);
377+
block_data |= ((uint32_t)byte_buffer[1] << 16);
378+
block_data |= ((uint32_t)byte_buffer[2] << 8);
379+
block_data |= ((uint32_t)byte_buffer[3]);
380+
return block_data;
376381
}
377382

383+
378384
static void t5577_writer_content_byte_input_confirmed(void* context) {
379385
T5577WriterApp* app = (T5577WriterApp*)context;
380386
T5577WriterModel* my_model = view_get_model(app->view_write);

0 commit comments

Comments
 (0)