Fix negative jump targets

This commit is contained in:
Rene Treffer 2014-04-03 10:51:05 +02:00
parent 8a8a7f3b0d
commit 921674b3f1

View file

@ -70,7 +70,7 @@ public class NameUtil {
) { ) {
int c = data[offset] & 0xff; int c = data[offset] & 0xff;
if ((c & 0xc0) == 0xc0) { if ((c & 0xc0) == 0xc0) {
c = ((c & 0x3f) << 8) + data[offset + 1]; c = ((c & 0x3f) << 8) + (data[offset + 1] & 0xff);
if (jumps.contains(c)) { if (jumps.contains(c)) {
throw new IllegalStateException("Cyclic offsets detected."); throw new IllegalStateException("Cyclic offsets detected.");
} }