From 766325c395a382f951384c28b01ba0c326be1d9f Mon Sep 17 00:00:00 2001
From: mizmar <54911858+mizmar@users.noreply.github.com>
Date: Wed, 19 Feb 2025 21:22:35 +0100
Subject: [PATCH] [Core] Fix inverted condition for setting
 booleanWarnings.maxTextMeasureCacheExceeded (#275)

---
 clay.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clay.h b/clay.h
index 162ff92..f893d3a 100644
--- a/clay.h
+++ b/clay.h
@@ -1443,7 +1443,7 @@ Clay__MeasureTextCacheItem *Clay__MeasureTextCached(Clay_String *text, Clay_Text
         measured = Clay__MeasureTextCacheItemArray_Get(&context->measureTextHashMapInternal, newItemIndex);
     } else {
         if (context->measureTextHashMapInternal.length == context->measureTextHashMapInternal.capacity - 1) {
-            if (context->booleanWarnings.maxTextMeasureCacheExceeded) {
+            if (!context->booleanWarnings.maxTextMeasureCacheExceeded) {
                 context->errorHandler.errorHandlerFunction(CLAY__INIT(Clay_ErrorData) {
                         .errorType = CLAY_ERROR_TYPE_ELEMENTS_CAPACITY_EXCEEDED,
                         .errorText = CLAY_STRING("Clay ran out of capacity while attempting to measure text elements. Try using Clay_SetMaxElementCount() with a higher value."),