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/timeline/public.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/api/client/timeline/public.go') diff --git a/internal/api/client/timeline/public.go b/internal/api/client/timeline/public.go index a2e1faf59..fda23438b 100644 --- a/internal/api/client/timeline/public.go +++ b/internal/api/client/timeline/public.go @@ -153,7 +153,7 @@ func (m *Module) PublicTimelineGETHandler(c *gin.Context) { limit := 20 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