fix some uninitialized values
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
Nishi 2026-04-27 08:54:13 +09:00
commit a78b7b6762
4 changed files with 9 additions and 6 deletions

View file

@ -405,8 +405,9 @@ static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) {
r->x11.width = width;
r->x11.height = height;
r->x11.grabbed = 0;
r->x11.force_render = 0;
r->x11.grabbed = 0;
r->x11.force_render = 0;
r->x11.dark_theme_detection = 0;
r->x11.colormap = DefaultColormap(r->x11.display, XDefaultScreen(r->x11.display));
r->x11.wm_delete = XInternAtom(r->x11.display, "WM_DELETE_WINDOW", False);

View file

@ -179,6 +179,9 @@ void MwDrawWidgetBack(MwWidget handle, MwRect* rect, MwLLColor color, int invert
MwDrawFrame(handle, rect, color, invert);
}
if(rect->width <= 0 || rect->height <= 0) return;
col = invert ? MwLightenColor(handle, color, -8, -8, -8) : color;
if(MwGetInteger(handle, MwNmodernLook)) {
MwDrawRectFading(handle, rect, col);

View file

@ -1,7 +1,6 @@
#include <Mw/Milsko.h>
#include "../../external/stb_ds.h"
#include "Mw/TypeDefs.h"
static void set_xywh(MwWidget handle) {
int height = 0;

View file

@ -1,7 +1,7 @@
CC = gcc
CFLAGS = `freetype-config --cflags`
CFLAGS = `pkg-config --cflags freetype2` -I../include
LDFLAGS =
LIBS = `freetype-config --libs`
LIBS = `pkg-config --libs freetype2`
.PHONY: all clean
.SUFFIXES: .c .o
@ -9,7 +9,7 @@ LIBS = `freetype-config --libs`
all: fuzzer font
fuzzer: fuzzer.o
$(CC) -g -L../src/ -Wl,-R../src -lMw -o $@ fuzzer.o
$(CC) -g -L../src/ -Wl,-R../src -o $@ fuzzer.o -lMw
font: font.o
$(CC) $(LDFLAGS) -o $@ font.o $(LIBS)