From 7998454ab97fdd693cc7b470e4199d14b62e04bc Mon Sep 17 00:00:00 2001 From: Nishi Date: Fri, 27 Mar 2026 12:54:33 +0900 Subject: [PATCH] fix ub --- src/draw.c | 2 +- src/lowlevel.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/draw.c b/src/draw.c index b1ab6d3..83ab630 100644 --- a/src/draw.c +++ b/src/draw.c @@ -209,7 +209,7 @@ void MwDrawWidgetBack(MwWidget handle, MwRect* rect, MwLLColor color, int invert MwLLColor col; MwBool rounded = MwGetInteger(handle, MwNroundness) != MwDEFAULT && MwGetInteger(handle, MwNisRounded) != 0; - if(border) { + if(border){ if(!handle->lowlevel->common.supports_transparency) { MwLLColor c = handle->parent == NULL ? NULL : MwParseColor(handle->parent, MwGetText(handle->parent, MwNbackground)); diff --git a/src/lowlevel.c b/src/lowlevel.c index 8f8a4d9..66c3d1d 100644 --- a/src/lowlevel.c +++ b/src/lowlevel.c @@ -54,6 +54,8 @@ void (*MwLLGetScreenSize)(MwLL handle, MwRect* rect) = NULL; void MwLLCreateCommon(MwLL handle) { handle->common.handler = malloc(sizeof(*handle->common.handler)); memset(handle->common.handler, 0, sizeof(*handle->common.handler)); + + handle->common.supports_transparency = 0; } void MwLLDestroyCommon(MwLL handle) {