Skip to content

Commit b697c18

Browse files
committed
Fix data section parsing
1 parent c5f77b4 commit b697c18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

section/load.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ static bool json_parse_data_config_element_per_line(DataConfig *out, const json_
233233
const json_t *value = json_object_get(obj, "elements_per_line");
234234
if(value == NULL) {
235235
ret = true; // use default value
236-
} else if(out->type != DATA_TYPE_HEX) {
237-
ERROR_MSG("Number of elements per line is only valid for hex data section");
236+
} else if((out->type != DATA_TYPE_HEX) && (out->type != DATA_TYPE_STRING)) {
237+
ERROR_MSG("Number of elements per line is only valid for hex and string data section");
238238
} else if (!json_validate_int(value, &out->elements_per_line)) {
239239
ERROR_MSG("Invalid number of elements per line.");
240240
} else {

0 commit comments

Comments
 (0)