Skip to content

Commit

Permalink
If obtained value is smaller than expected, retry
Browse files Browse the repository at this point in the history
 - fixes #1332
 - thanks xpirt
  • Loading branch information
iBotPeaches committed Oct 13, 2016
1 parent 31ce5a3 commit 894da20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion brut.j.util/src/main/java/brut/util/ExtDataInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void skipCheckByte(byte expected) throws IOException {
public void skipCheckChunkTypeInt(int expected, int possible) throws IOException {
int got = readInt();

if (got == possible) {
if (got == possible || got < expected) {
skipCheckChunkTypeInt(expected, -1);
} else if (got != expected) {
throw new IOException(String.format("Expected: 0x%08x, got: 0x%08x", expected, got));
Expand Down

0 comments on commit 894da20

Please sign in to comment.