mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-21 18:26:06 -05:00
Only do hex conversion if param is 0x-format. Also accept song-spec from Retune (issue #90).
This commit is contained in:
@@ -119,6 +119,10 @@ safe_hextou32(const char *str, uint32_t *val)
|
||||
char *end;
|
||||
unsigned long intval;
|
||||
|
||||
/* A hex shall begin with 0x */
|
||||
if (strncmp(str, "0x", 2) != 0)
|
||||
return safe_atou32(str, val);
|
||||
|
||||
errno = 0;
|
||||
intval = strtoul(str, &end, 16);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user