Skip to content
New issue

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

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

Already on GitHub? # to your account

png2src return value does not report errors to the caller #786

Closed
peppergrayxyz opened this issue Dec 12, 2024 · 0 comments · Fixed by #787
Closed

png2src return value does not report errors to the caller #786

peppergrayxyz opened this issue Dec 12, 2024 · 0 comments · Fixed by #787

Comments

@peppergrayxyz
Copy link
Contributor

If png2src encounters an error, it does not report it via its return value:

$ w4 png2src --zig lib/test/data/smile_8x8_5colors.png
Error processing lib/test/data/smile_8x8_5colors.png: 
Too many colors: maximum is 4. The previous colors were:
- (R: 0, G: 0, B: 0, A: 255); first seen at (0, 0)
- (R: 255, G: 255, B: 255, A: 255); first seen at (2, 0)
- (R: 0, G: 255, B: 0, A: 255); first seen at (2, 2)
- (R: 255, G: 0, B: 0, A: 255); first seen at (2, 5)
The first occurrence of another color is at (3, 6) and has the value of (R: 0, G: 0, B: 255, A: 255)

Expected behavior:

$ echo $?
1

Actual behavior:

$ echo $?
0
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant