Merge pull request #799 from fudiwei/bugfix

bugfix
This commit is contained in:
RHQYZ 2025-06-15 22:23:24 +08:00 committed by GitHub
commit a492fbe18c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,7 +103,7 @@ func GetOrDefaultInt32(dict map[string]any, key string, defaultValue int32) int3
} }
if result != 0 { if result != 0 {
return int32(result) return result
} }
} }
@ -166,13 +166,13 @@ func GetOrDefaultInt64(dict map[string]any, key string, defaultValue int64) int6
result = int64(v) result = int64(v)
case string: case string:
// 兼容字符串类型的值 // 兼容字符串类型的值
if t, err := strconv.ParseInt(v, 10, 32); err == nil { if t, err := strconv.ParseInt(v, 10, 64); err == nil {
result = t result = t
} }
} }
if result != 0 { if result != 0 {
return int64(result) return result
} }
} }