Skip to content

Commit

Permalink
fix sec
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn committed Dec 23, 2023
1 parent 26dd708 commit daaed0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func setDefaultForSlice(field reflect.Value, tagValue string, elemType reflect.T
if intVal, err := strconv.ParseInt(item, 10, 64); err == nil {
switch elemType.Kind() {
case reflect.Int:
if strconv.IntSize == 64 || (intVal >= int64(math.MinInt32) && intVal <= int64(math.MaxInt32)) {
if strconv.IntSize == 64 && (intVal >= int64(math.MinInt32) && intVal <= int64(math.MaxInt32)) {
val = reflect.ValueOf(int(intVal))
}
case reflect.Int8:
Expand Down

0 comments on commit daaed0d

Please sign in to comment.