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 bug in the assert condition in Address::ToString function. #224

Closed

Conversation

tldQuantic
Copy link
Contributor

The reason why the current code didn't trigger the assert right now in the yojimbo unit tests is because bufferSize is always equals to MaxAddressLength.

Fix bug in the assert condition in Address::ToString function.
@gafferongames
Copy link
Contributor

I'm not sure about this change. Idea is that you are supposed to pass in a buffer length >= MaxAddressLength, so the check makes sure you do that?

@tldQuantic
Copy link
Contributor Author

Ah, ok! I misunderstood this code, my bad...
MaxAddressLength is the minimum size of the buffer you should pass to the function.

By the way, a value of 256 for MaxAddressLength seems huge to me.

I will close this PR.
Thanks.

@tldQuantic tldQuantic closed this Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants