mirror of
https://github.com/Architeuthis-Flux/Jumperless.git
synced 2024-11-27 17:00:55 +01:00
Accept #
prefix for colors
This commit is contained in:
parent
f4dc793289
commit
1ae05b08e3
@ -351,6 +351,10 @@ int removeHexPrefix(const char *str)
|
||||
const char *hexValue = str + 2;
|
||||
return strtol(hexValue, nullptr, 16);
|
||||
}
|
||||
if (str[0] == '#') {
|
||||
const char *hexValue = str + 1;
|
||||
return strtol(hexValue, nullptr, 16);
|
||||
}
|
||||
return atoi(str);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user