Browse Source

Fix hash issue with OptimizedTranslation caused by signed char

Zae 5 months ago
parent
commit
0013d30c92
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/string/optimized_translation.h

+ 1 - 1
core/string/optimized_translation.h

@@ -64,7 +64,7 @@ class OptimizedTranslation : public Translation {
 			d = 0x1000193;
 			d = 0x1000193;
 		}
 		}
 		while (*p_str) {
 		while (*p_str) {
-			d = (d * 0x1000193) ^ uint32_t(*p_str);
+			d = (d * 0x1000193) ^ static_cast<uint8_t>(*p_str);
 			p_str++;
 			p_str++;
 		}
 		}