If obtained value is smaller than expected, retry

- fixes #1332
 - thanks xpirt
This commit is contained in:
Connor Tumbleson 2016-10-13 09:00:08 -04:00
parent 31ce5a315d
commit 894da2033b
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75

View File

@ -69,7 +69,7 @@ public class ExtDataInput extends DataInputDelegate {
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));