From 2d6e9afe875904abc26dd199f05722ddb16d0acf Mon Sep 17 00:00:00 2001 From: Nic Barker Date: Tue, 22 Oct 2024 21:12:47 +1300 Subject: [PATCH] Fix GCC type cast --- clay.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clay.h b/clay.h index f04db0d..4630c9d 100644 --- a/clay.h +++ b/clay.h @@ -2182,7 +2182,7 @@ void Clay__CalculateFinalLayout() { Clay__MeasuredWord *measuredWord = Clay__MeasuredWordArraySlice_Get(&measureTextCacheItem->measuredWords, wordIndex); // Only word on the line is too large, just render it anyway if (lineLengthChars == 0 && lineWidth + measuredWord->width > containerElement->dimensions.width) { - Clay__StringArray_Add(&Clay__wrappedTextLines, CLAY__INIT(Clay_String) {.length = measuredWord->length, .chars = &textElementData->text.chars[measuredWord->startOffset] }); + Clay__StringArray_Add(&Clay__wrappedTextLines, CLAY__INIT(Clay_String) {.length = (int)measuredWord->length, .chars = &textElementData->text.chars[measuredWord->startOffset] }); textElementData->wrappedLines.length++; } // measuredWord->length == 0 means a newline character