From 894da2033ba5dccec385a619b0e9177d01f2efe7 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Thu, 13 Oct 2016 09:00:08 -0400 Subject: [PATCH] If obtained value is smaller than expected, retry - fixes #1332 - thanks xpirt --- brut.j.util/src/main/java/brut/util/ExtDataInput.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brut.j.util/src/main/java/brut/util/ExtDataInput.java b/brut.j.util/src/main/java/brut/util/ExtDataInput.java index 72ef4140b2..72f4e15c54 100644 --- a/brut.j.util/src/main/java/brut/util/ExtDataInput.java +++ b/brut.j.util/src/main/java/brut/util/ExtDataInput.java @@ -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));