mirror of
https://github.com/profullstack/agentbbs.git
synced 2026-08-13 14:27:27 +00:00
fix(nntp): handle open-ended OVER range like '5-'
This commit is contained in:
parent
43dbdf0e06
commit
a3c74cd0e2
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue