Skip to content

Commit

Permalink
Adding parent ID to the NBGL serialization data
Browse files Browse the repository at this point in the history
  • Loading branch information
iartemov-ledger committed Aug 9, 2023
1 parent 4a02d27 commit ec01b53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib_nbgl/src/nbgl_serialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ static uint8_t getObjId(nbgl_obj_t *obj) {

// serialize a nbgl_obj_t structure (including nbgl_area_t)
static void nbgl_serializeObj(nbgl_obj_t *obj, uint8_t *out, size_t *w_cnt, size_t max_len) {
// at first serialize an id
// at first serialize the id
nbgl_appendU8(getObjId(obj), out, w_cnt, max_len);
// then serialize the parent id
nbgl_appendU8(getObjId(obj->parent), out, w_cnt, max_len);
// the only field to be serialized is the object type
nbgl_appendU8((uint8_t) obj->type, out, w_cnt, max_len);
// then serialize the area
Expand Down

0 comments on commit ec01b53

Please sign in to comment.