mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 16:52:18 +01:00
lib/parsecolor: add "none" and "transparent"
This commit is contained in:
1 parent
30ac5c2e89
commit
40cf8c0ad1
3 files changed
+13
-2
No files matched your search
@@ -85,7 +85,10 @@ parse_color(const char* s_ptr, size_t s_len) {
|
||||
const char* b_ptr = &buf[0];
|
||||
size_t b_len = s_len;
|
||||
int adjustment = 0;
|
||||
if ((b_len > 4) && !memcmp(buf, "dark", 4)) {
|
||||
if (((b_len == 4) && !memcmp(buf, "none", 4)) ||
|
||||
((b_len == 11) && !memcmp(buf, "transparent", 11))) {
|
||||
return 0;
|
||||
} else if ((b_len > 4) && !memcmp(buf, "dark", 4)) {
|
||||
adjustment = 1;
|
||||
b_ptr += 4;
|
||||
b_len -= 4;
|
||||
|
||||
Reference in new issue
Block a user