Fix AskStubber erroring out when there are more asks than stubs
This commit is contained in:
parent
e2efc0b8a3
commit
eee32f324c
1 changed files with 1 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ func InitAskStubber() (*AskStubber, func()) {
|
|||
as.AskOnes = append(as.AskOnes, &p)
|
||||
count := as.OneCount
|
||||
as.OneCount += 1
|
||||
if count > len(as.StubOnes) {
|
||||
if count >= len(as.StubOnes) {
|
||||
panic(fmt.Sprintf("more asks than stubs. most recent call: %v", p))
|
||||
}
|
||||
stubbedPrompt := as.StubOnes[count]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue