Changed how EIP-712 array progression is counted
This commit is contained in:
@@ -255,6 +255,7 @@ static bool array_depth_list_push(uint8_t path_idx, uint8_t size) {
|
||||
arr = &path_struct->array_depths[path_struct->array_depth_count];
|
||||
arr->path_index = path_idx;
|
||||
arr->size = size;
|
||||
arr->index = 0;
|
||||
path_struct->array_depth_count += 1;
|
||||
return true;
|
||||
}
|
||||
@@ -559,8 +560,8 @@ static bool path_advance_in_array(void) {
|
||||
|
||||
if ((path_struct->array_depth_count > 0) &&
|
||||
(arr_depth->path_index == (path_struct->depth_count - 1))) {
|
||||
if (arr_depth->size > 0) arr_depth->size -= 1;
|
||||
if (arr_depth->size == 0) {
|
||||
arr_depth->index += 1;
|
||||
if (arr_depth->index == arr_depth->size) {
|
||||
array_depth_list_pop();
|
||||
end_reached = true;
|
||||
} else {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
typedef struct {
|
||||
uint8_t path_index;
|
||||
uint8_t size;
|
||||
uint8_t index;
|
||||
} s_array_depth;
|
||||
|
||||
typedef enum { ROOT_DOMAIN, ROOT_MESSAGE } e_root_type;
|
||||
|
||||
Reference in New Issue
Block a user