Skip to content

Commit 3e469fe

Browse files
authored
fix(encoding/text): int conversion on 32bit (#32)
1 parent 89a757b commit 3e469fe

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

encoding/text/text.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ func decodeText(ctx *fasthttp.RequestCtx, v interface{}) error {
2828
*t = b
2929

3030
case *int:
31-
d, err := strconv.ParseInt(b2s(b), 10, 64)
31+
d, err := strconv.Atoi(b2s(b))
3232
if err != nil {
3333
return err
3434
}
3535

36-
*t = int(d)
36+
*t = d
3737

3838
case *int8:
3939
d, err := strconv.ParseInt(b2s(b), 10, 8)
@@ -68,7 +68,7 @@ func decodeText(ctx *fasthttp.RequestCtx, v interface{}) error {
6868
*t = d
6969

7070
case *uint:
71-
d, err := strconv.ParseUint(b2s(b), 10, 64)
71+
d, err := strconv.ParseUint(b2s(b), 10, 0)
7272
if err != nil {
7373
return err
7474
}

0 commit comments

Comments
 (0)