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

ByteString.IndexOf throws IndexOutOfRangeException after concating two ByteStrings #1852

Closed
marcpiechura opened this issue Apr 6, 2016 · 2 comments

Comments

@marcpiechura
Copy link
Contributor

After concating two ByteString's IndexOf throws the exception if the element didn't exist.

Example:

var b = ByteString.Create(new byte[] {1}) + ByteString.Create(new byte[] {2});

b.IndexOf(3);
@wmeints
Copy link
Contributor

wmeints commented Apr 15, 2016

Changed things around a bit. I found a better way to fix the problem.
After looking around a bit more, I think that HasNext should return false when there are no more sub iterators left in the list.

@Silv3rcircl3 Can you check if this works better for you?

@marcpiechura
Copy link
Contributor Author

Closed via #1887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants