Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
xtruan committed Mar 10, 2023
1 parent 570c943 commit 2c72c2d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions views/flipbip_scene_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,7 @@ void flipbip_scene_1_draw(Canvas* canvas, FlipBipScene1Model* model) {
canvas_draw_str_aligned(canvas, receive_len, 2, AlignLeft, AlignTop, TEXT_RECEIVE_ADDRESS);

// draw address number
unsigned char addr_num[1];
addr_num[0] = (unsigned char)(model->page - PAGE_ADDR_BEGIN);
const unsigned char addr_num[1] = {(unsigned char)(model->page - PAGE_ADDR_BEGIN)};
char addr_num_text[3];
flipbip_btox(addr_num, 1, addr_num_text);
addr_num_text[0] = '/';
Expand Down Expand Up @@ -622,10 +621,10 @@ FlipBipScene1* flipbip_scene_1_alloc() {
view_set_input_callback(instance->view, flipbip_scene_1_input);
view_set_enter_callback(instance->view, flipbip_scene_1_enter);
view_set_exit_callback(instance->view, flipbip_scene_1_exit);

// allocate the address node
s_addr_node = (HDNode*)malloc(sizeof(HDNode));

// allocate the display text
s_disp_text1 = (char*)malloc(30 + 1);
s_disp_text2 = (char*)malloc(30 + 1);
Expand All @@ -646,7 +645,7 @@ void flipbip_scene_1_free(FlipBipScene1* instance) {
// free the address node
memzero(s_addr_node, sizeof(HDNode));
free(s_addr_node);

// free the display text
flipbip_scene_1_clear_text();
free(s_disp_text1);
Expand Down

0 comments on commit 2c72c2d

Please sign in to comment.