mirror of https://github.com/thesofproject/sof.git
toml_utils: Adding support for decimal numbers in hex parser
Modified the strtoul function parameter to automatically recognize the value format. This will avoid the situation when a decimal value is parsed as hexadecimal. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
This commit is contained in:
parent
5ebbd6530c
commit
a4ca53c9f1
|
@ -150,7 +150,7 @@ uint32_t parse_uint32_hex_key(const toml_table_t *table, struct parse_ctx *ctx,
|
|||
*error = err_key_parse(key, NULL);
|
||||
return UINT32_MAX;
|
||||
}
|
||||
val = strtoul(temp_s, 0, 16);
|
||||
val = strtoul(temp_s, 0, 0);
|
||||
|
||||
free(temp_s);
|
||||
/* assert parsing success and value is within uint32_t range */
|
||||
|
|
Loading…
Reference in New Issue