Skip to content

Commit

Permalink
- Initialize pressed_right to 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinkyaraj-23 committed Feb 13, 2024
1 parent 38bcd2a commit 230434b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
11 changes: 6 additions & 5 deletions app/src/ui_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ tz_ui_stream_init(void (*cb)(uint8_t))

FUNC_ENTER(("cb=%p", cb));
memset(s, 0x0, sizeof(*s));
s->cb = cb;
s->full = false;
s->current = 0;
s->total = -1;
s->last = 0;
s->cb = cb;
s->full = false;
s->current = 0;
s->pressed_right = false;
s->total = -1;
s->last = 0;

ui_strings_init();

Expand Down
14 changes: 6 additions & 8 deletions app/src/ui_stream_nbgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,12 @@ tz_ui_stream_init(void (*cb)(uint8_t))

FUNC_ENTER(("cb=%p", cb));
memset(s, 0x0, sizeof(*s));
s->cb = cb;
s->full = false;
s->last = 0;
s->current = -1;
s->total = -1;
s->cb = cb;
s->full = false;
s->last = 0;
s->current = -1;
s->total = -1;
s->pressed_right = false;

ui_strings_init();

Expand Down Expand Up @@ -344,9 +345,6 @@ tz_ui_nav_cb(uint8_t page, nbgl_pageContent_t *content)
s->pressed_right, s->current, s->total, s->full, global.step);

if (global.step == ST_ERROR) {
// TODO: this is handled by change_screen_right except we disable it
// to use it here. We should make ui_stream fully compatible with
// exception.h
global.step = ST_IDLE;
ui_home_init();
result = false;
Expand Down

0 comments on commit 230434b

Please sign in to comment.