[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.
This commit is contained in:
Daniele Sluijters 2022-12-04 14:20:41 +01:00 committed by GitHub
commit 847e7c7c3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 10 additions and 10 deletions

View file

@ -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)