Compare commits

..

2 Commits

Author SHA1 Message Date
Jefferey S
e253f24e19
Merge afe52f946b into 40ae6d8894 2025-01-30 06:44:41 +01:00
Harrison Lambeth
40ae6d8894
Fix int conversion errors in msvc (#242)
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
2025-01-30 15:46:37 +13:00

2
clay.h
View File

@ -990,7 +990,7 @@ uint32_t Clay__HashTextWithConfig(Clay_String *text, Clay_TextElementConfig *con
if (config->hashStringContents) { if (config->hashStringContents) {
uint32_t maxLengthToHash = CLAY__MIN(text->length, 256); uint32_t maxLengthToHash = CLAY__MIN(text->length, 256);
for (int i = 0; i < maxLengthToHash; i++) { for (uint32_t i = 0; i < maxLengthToHash; i++) {
hash += text->chars[i]; hash += text->chars[i];
hash += (hash << 10); hash += (hash << 10);
hash ^= (hash >> 6); hash ^= (hash >> 6);