clay.h: Fix struct with default initializer not using CLAY__DEFAULT_STRUCT

This commit is contained in:
Víctor López 2025-08-30 11:47:55 +00:00 committed by GitHub
parent 1bc5105272
commit 70f9012886
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

2
clay.h
View file

@ -1659,7 +1659,7 @@ Clay__MeasureTextCacheItem *Clay__MeasureTextCached(Clay_String *text, Clay_Text
char current = text->chars[end];
if (current == ' ' || current == '\n') {
int32_t length = end - start;
Clay_Dimensions dimensions = {};
Clay_Dimensions dimensions = CLAY__DEFAULT_STRUCT;
if (length > 0) {
dimensions = Clay__MeasureText(CLAY__INIT(Clay_StringSlice) {.length = length, .chars = &text->chars[start], .baseChars = text->chars}, config, context->measureTextUserData);
}