Skip to content

Commit

Permalink
[ppm] fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
umjammer committed Aug 8, 2022
1 parent c714cc6 commit 919afbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/vavi/imageio/ppm/Ppm.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void readHeader(InputStream is) throws IOException {

if (signature[0] == 80) {
imageType = signature[1] - 48;
if (imageType < BINARY_PBM && imageType > BINARY_PPM) {
if (imageType < BINARY_PBM || imageType > BINARY_PPM) {
throw new IOException("Bad PBM/PGM/PPM signature!");
}
} else {
Expand Down

0 comments on commit 919afbf

Please sign in to comment.