[Compilers] Fix struct with default initializer not using CLAY__DEFAULT_STRUCT (#498)

This commit is contained in:
Víctor López 2025-09-08 02:14:05 +00:00 committed by GitHub
parent f55513493b
commit 958d684b3c
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);
}