Compare commits

...

2 Commits

Author SHA1 Message Date
Nic Barker
d9ad451d3e
Merge 577946a3be into 40ae6d8894 2025-01-30 16:17:32 -06: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

@ -1058,7 +1058,7 @@ uint32_t Clay__HashTextWithConfig(Clay_String *text, Clay_TextElementConfig *con
if (config->hashStringContents) {
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 += (hash << 10);
hash ^= (hash >> 6);