Skip to content

Commit bb05e9e

Browse files
authored
Merge pull request #243 from Nadahar/fix_signed_byte_bug
Fix another "signed byte" bug introduced in #234
2 parents 83b37bf + 8446204 commit bb05e9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/com/drew/metadata/jpeg/JpegDhtReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void extract(@NotNull final SequentialReader reader, @NotNull final Metad
7272
byte[] lBytes = getBytes(reader, 16);
7373
int vCount = 0;
7474
for (byte b : lBytes) {
75-
vCount += b;
75+
vCount += (b & 0xFF);
7676
}
7777
byte[] vBytes = getBytes(reader, vCount);
7878
directory.getTables().add(new HuffmanTable(tableClass, tableDestinationId, lBytes, vBytes));

0 commit comments

Comments
 (0)