Skip to content

Commit

Permalink
Fix data section parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
BlockoS committed Dec 26, 2024
1 parent c5f77b4 commit b697c18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions section/load.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ static bool json_parse_data_config_element_per_line(DataConfig *out, const json_
const json_t *value = json_object_get(obj, "elements_per_line");
if(value == NULL) {
ret = true; // use default value
} else if(out->type != DATA_TYPE_HEX) {
ERROR_MSG("Number of elements per line is only valid for hex data section");
} else if((out->type != DATA_TYPE_HEX) && (out->type != DATA_TYPE_STRING)) {
ERROR_MSG("Number of elements per line is only valid for hex and string data section");
} else if (!json_validate_int(value, &out->elements_per_line)) {
ERROR_MSG("Invalid number of elements per line.");
} else {
Expand Down

0 comments on commit b697c18

Please sign in to comment.