From 4f8898b30287a24889e51b97b607008fb69314f5 Mon Sep 17 00:00:00 2001
From: Alex Pedley <alex@pedley.org>
Date: Mon, 17 Feb 2025 15:59:54 +0000
Subject: [PATCH] Make fakeContext use correct value from currentContext

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

diff --git a/clay.h b/clay.h
index cbc79be..38b71da 100644
--- a/clay.h
+++ b/clay.h
@@ -3589,7 +3589,7 @@ uint32_t Clay_MinMemorySize(void) {
     Clay_Context* currentContext = Clay_GetCurrentContext();
     if (currentContext) {
         fakeContext.maxElementCount = currentContext->maxElementCount;
-        fakeContext.maxMeasureTextCacheWordCount = currentContext->maxElementCount;
+        fakeContext.maxMeasureTextCacheWordCount = currentContext->maxMeasureTextCacheWordCount;
     }
     // Reserve space in the arena for the context, important for calculating min memory size correctly
     Clay__Context_Allocate_Arena(&fakeContext.internalArena);