浏览代码

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;
         if (string.IsNullOrWhiteSpace(str)) return 0;
         unchecked
         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)
             for (int i = 0; i < str.Length; i += 2)
             {
             {
                 hash1 = ((hash1 << 5) + hash1) ^ str[i];
                 hash1 = ((hash1 << 5) + hash1) ^ str[i];