Fix incorrect handling of naked newline characters in text blocks

This commit is contained in:
Nic Barker 2024-12-04 15:45:46 +13:00
parent 41f6616993
commit 9f0cf751da

1
clay.h
View File

@ -2576,6 +2576,7 @@ void Clay__CalculateFinalLayout() {
for (int lineIndex = 0; lineIndex < currentElement->textElementData->wrappedLines.length; ++lineIndex) { for (int lineIndex = 0; lineIndex < currentElement->textElementData->wrappedLines.length; ++lineIndex) {
Clay_String wrappedLine = currentElement->textElementData->wrappedLines.internalArray[lineIndex]; // todo range check Clay_String wrappedLine = currentElement->textElementData->wrappedLines.internalArray[lineIndex]; // todo range check
if (wrappedLine.length == 0) { if (wrappedLine.length == 0) {
yPosition += finalLineHeight;
continue; continue;
} }
Clay__AddRenderCommand(CLAY__INIT(Clay_RenderCommand) { Clay__AddRenderCommand(CLAY__INIT(Clay_RenderCommand) {