From 0b52059faf98522854f596f3ac81414c16993389 Mon Sep 17 00:00:00 2001 From: gutmet Date: Wed, 21 Oct 2020 13:51:21 +0200 Subject: [PATCH] bugfix: parse and format int64 correctly --- drivel.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivel.go b/drivel.go index a137e65..de740c8 100644 --- a/drivel.go +++ b/drivel.go @@ -314,8 +314,9 @@ func timelineLoop(endpoint string, flags timelineFlags) (tweets []Status) { if len(tmp) == 0 { break } - lowestSoFar, _ := strconv.Atoi(tmp[len(tmp)-1].Id_str) - maxID = strconv.Itoa(lowestSoFar - 1) + var lowestSoFar int64 + lowestSoFar, _ = strconv.ParseInt(tmp[len(tmp)-1].Id_str, 10, 64) + maxID = strconv.FormatInt(lowestSoFar-1, 10) tweets = append(tweets, tmp...) if len(tweets) > flags.count { tweets = tweets[:flags.count]