Fix bound check for short offset in Precoditions class

This commit is contained in:
Ben Gruver 2013-06-22 13:07:39 -07:00
parent 198e0816cf
commit e636af4931

View File

@ -118,7 +118,7 @@ public class Preconditions {
}
public static int checkShortCodeOffset(int offset) {
if (offset < -32768 || offset > 32768) {
if (offset < -32768 || offset > 32767) {
throw new IllegalArgumentException(
String.format("Invalid code offset: %d. Must be between -32768 and 32767, inclusive.", offset));
}