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 boundary issue in PackedGaussians::at(int i) #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fortmeier
Copy link

This fixes the issue I noticed in #17

The problem with the previous implementation is that if scales[start3 +3] is bounds checked (maybe only in Release or not at all in a compiler different than mine = VS2022), this will raise an error instead of giving the offsetted pointer as intended.

I think the the current implementation is undefined behaviour that accidentally works in most settings.

My fix uses pointer arthetic, which is not so elegant, but in this case I think it is valid to use it.

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.

1 participant