mirror of
https://github.com/nicbarker/clay.git
synced 2025-09-18 04:26:18 +00:00
[Compilers] Fix struct with default initializer not using CLAY__DEFAULT_STRUCT (#498)
This commit is contained in:
parent
f55513493b
commit
958d684b3c
2
clay.h
2
clay.h
|
@ -1659,7 +1659,7 @@ Clay__MeasureTextCacheItem *Clay__MeasureTextCached(Clay_String *text, Clay_Text
|
||||||
char current = text->chars[end];
|
char current = text->chars[end];
|
||||||
if (current == ' ' || current == '\n') {
|
if (current == ' ' || current == '\n') {
|
||||||
int32_t length = end - start;
|
int32_t length = end - start;
|
||||||
Clay_Dimensions dimensions = {};
|
Clay_Dimensions dimensions = CLAY__DEFAULT_STRUCT;
|
||||||
if (length > 0) {
|
if (length > 0) {
|
||||||
dimensions = Clay__MeasureText(CLAY__INIT(Clay_StringSlice) {.length = length, .chars = &text->chars[start], .baseChars = text->chars}, config, context->measureTextUserData);
|
dimensions = Clay__MeasureText(CLAY__INIT(Clay_StringSlice) {.length = length, .chars = &text->chars[start], .baseChars = text->chars}, config, context->measureTextUserData);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue