Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Call.Unset() panic (issue #1236) #1250

Merged

Commits on Aug 16, 2022

  1. Fix Call.Unset() panic (issue stretchr#1236)

    Unset changes len of a `ExpectedCalls` slice during iteration while using index from original slice, and under some conditions it tries to reslice element beyond of the slice boundaries. That causes panic.
    
    The proposed solution uses independent write index to count elements kept in output slice.
    
    Tests (the simplest and more complicated cases) and comments are included.
    lisitsky committed Aug 16, 2022
    Configuration menu
    Copy the full SHA
    d659ea1 View commit details
    Browse the repository at this point in the history