fix(nntp): handle open-ended OVER range like '5-' (#75)
Some checks failed
CI / build (push) Has been cancelled
deploy / deploy (push) Has been cancelled
test / test (push) Has been cancelled

This commit is contained in:
forgou37 2026-07-03 03:20:39 +03:00 committed by GitHub
parent 11f7b8ea2e
commit 6a086eb7cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -181,6 +181,9 @@ func parseRange(spec string) (low, high int64) {
if err != nil {
return 0, 0 // malformed — empty range
}
if parts[1] == "" {
return l, math.MaxInt64 // open-ended range like "5-"
}
h, err := strconv.ParseInt(parts[1], 10, 64)
if err != nil {
return 0, 0 // malformed — empty range