소스 검색

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

喵你个旺呀 1 년 전
부모
커밋
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];