From 8adb52e63a9ac280b30e8af628d0f7ed250e6bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 5 Apr 2021 22:31:09 +0200 Subject: [PATCH] =?UTF-8?q?osc:=20parse=5Frgb():=20ensure=20=E2=80=98alpha?= =?UTF-8?q?=E2=80=99=20has=20been=20initialized?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- osc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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])));