-
Notifications
You must be signed in to change notification settings - Fork 58
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
your sample code is not processing the very last pixel in your png example. #97
Comments
Thank you @bvdeenen! I will take a look at it |
I just checked to make sure, and I'm right:
This prints 0 and 4, whereas the last one should be |
Solved by #98 |
I'm pretty sure the issue still exists after the merge. Probably forgotten in the refactor. @pedropark99 |
Thanks, fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Pedro
I was trying the Zig array out of bounds check while having built your png example and just added
+2
to thebuffer[index + ..]
statements.To my surprise the array bounds checker didn't trigger.
A bit of searching led me the conclusion your
while
loop limit is wrong. It should just beindex<len
. The limit is checked before the loop body is executed, the increment(index+=4)
after the loop body has been executed.Thanks for the great work!
The text was updated successfully, but these errors were encountered: