aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-04-05 20:31:09 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-04-18 18:07:56 +0000
commit8adb52e63a9ac280b30e8af628d0f7ed250e6bd0 (patch)
tree3311ed09f50897bcdb679f66efd6893093d26e35
parentosc: add support for URxvt extension to include alpha in OSC-11 (diff)
osc: parse_rgb(): ensure ‘alpha’ has been initialized
-rw-r--r--osc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/osc.c b/osc.c
index eade736a..99803236 100644
--- a/osc.c
+++ b/osc.c
@@ -395,7 +395,7 @@ parse_rgb(const char *string, uint32_t *color, bool *_have_alpha,
uint8_t g = 256 * (rgb[1] / (double)(1 << (4 * digits[1])));
uint8_t b = 256 * (rgb[2] / (double)(1 << (4 * digits[2])));
- uint16_t alpha;
+ uint16_t alpha = 0xffff;
if (have_alpha)
alpha = 65536 * (rgb[3] / (double)(1 << (4 * digits[3])));