Skip to content

Commit

Permalink
fixed: pkg/convert Incorrect conversion between integer types
Browse files Browse the repository at this point in the history
  • Loading branch information
ben committed Aug 1, 2023
1 parent 751eaff commit ab986df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/convert/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func (s StringTo) String() string {
}

func (s StringTo) Int() int {
v, _ := strconv.ParseInt(s.String(), 10, 64)
v, _ := strconv.ParseInt(s.String(), 10, 16)
return int(v)
}

Expand All @@ -18,7 +18,7 @@ func (s StringTo) MustInt() int {
}

func (s StringTo) UInt32() uint32 {
v, _ := strconv.ParseInt(s.String(), 10, 64)
v, _ := strconv.ParseUint(s.String(), 10, 32)
return uint32(v)
}

Expand Down

0 comments on commit ab986df

Please sign in to comment.