Compare commits

...

2 Commits

Author SHA1 Message Date
Nic Barker
14b3b58913
Merge 06d6ed32fd into 40ae6d8894 2025-01-31 04:31:31 +00: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

@ -1057,7 +1057,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);