bugfix: parse and format int64 correctly

This commit is contained in:
gutmet 2020-10-21 13:51:21 +02:00
parent f4b0627bbc
commit 0b52059faf

View File

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