From 847e7c7c3a1f18eda13004eca64d2606bde54d33 Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Sun, 4 Dec 2022 14:20:41 +0100 Subject: [chore] Fix a few possible cases of int truncation (#1207) This fixes a couple of cases where due to int being platform dependent a value could get truncated if running on 32bits. --- internal/api/client/account/statuses.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/api/client/account/statuses.go') diff --git a/internal/api/client/account/statuses.go b/internal/api/client/account/statuses.go index c4c5f67ee..7ecf3ba9f 100644 --- a/internal/api/client/account/statuses.go +++ b/internal/api/client/account/statuses.go @@ -152,7 +152,7 @@ func (m *Module) AccountStatusesGETHandler(c *gin.Context) { limit := 30 limitString := c.Query(LimitKey) if limitString != "" { - i, err := strconv.ParseInt(limitString, 10, 64) + i, err := strconv.ParseInt(limitString, 10, 32) if err != nil { err := fmt.Errorf("error parsing %s: %s", LimitKey, err) api.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGet) -- cgit v1.2.3