diff --git a/fuzz/src/main/java/edu/berkeley/cs/jqf/fuzz/ei/ir/TypedInputStream.java b/fuzz/src/main/java/edu/berkeley/cs/jqf/fuzz/ei/ir/TypedInputStream.java index fdb613d9f..58db3539d 100644 --- a/fuzz/src/main/java/edu/berkeley/cs/jqf/fuzz/ei/ir/TypedInputStream.java +++ b/fuzz/src/main/java/edu/berkeley/cs/jqf/fuzz/ei/ir/TypedInputStream.java @@ -87,7 +87,7 @@ public String readString(List dictionary) throws IOException { TypedGeneratedValue ret = readValue(TypedGeneratedValue.Type.String); bytesRead+=4; //Historically JQF has counted strings as 4 bytes (an int into a dictionary) positionInInput++; - return dictionary.get(((TypedGeneratedValue.StringValue) ret).keyNotBoundedBySize % dictionary.size()); + return dictionary.get(Math.abs(((TypedGeneratedValue.StringValue) ret).keyNotBoundedBySize % dictionary.size())); } public char readChar() throws IOException {