mirror of https://codeberg.org/pzp/pzp-goals.git
fix off-by-one in crossGoalWithTangle()
This commit is contained in:
parent
90fff89910
commit
e129a47912
|
@ -107,10 +107,10 @@ module.exports = {
|
|||
case 'all':
|
||||
return [0, maxDepth]
|
||||
case 'newest':
|
||||
const start = Math.max(0, maxDepth - goal.count)
|
||||
const start = Math.max(0, maxDepth - goal.count + 1)
|
||||
return [start, maxDepth]
|
||||
case 'oldest':
|
||||
const end = Math.min(maxDepth, goal.count)
|
||||
const end = Math.min(maxDepth, goal.count - 1)
|
||||
return [0, end]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue