Only do hex conversion if param is 0x-format. Also accept song-spec from Retune (issue #90).

This commit is contained in:
ejurgensen
2015-01-26 22:37:02 +01:00
parent 77f206c118
commit dccbe92a75
2 changed files with 12 additions and 9 deletions

View File

@@ -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);