Просмотр исходного кода

fix: 修复字典精度丢失问题

喵你个旺呀 1 год назад
Родитель
Сommit
d5e0718793
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      Admin.NET/Admin.NET.Core/Utils/CommonUtil.cs

+ 2 - 2
Admin.NET/Admin.NET.Core/Utils/CommonUtil.cs

@@ -28,8 +28,8 @@ public static class CommonUtil
         if (string.IsNullOrWhiteSpace(str)) return 0;
         unchecked
         {
-            long hash1 = (5381 << 16) + 5381;
-            long hash2 = hash1;
+            int hash1 = (5381 << 16) + 5381;
+            int hash2 = hash1;
             for (int i = 0; i < str.Length; i += 2)
             {
                 hash1 = ((hash1 << 5) + hash1) ^ str[i];