Skip to content

Commit c252884

Browse files
authored
Merge pull request #120 from bgrozev/edge-workaround
fix: Uses the correct index.
2 parents 907b36c + ed26be4 commit c252884

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/ice4j/attribute/UsernameAttribute.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void decodeAttributeBody(byte[] attributeValue, char offset, char length)
8181
{
8282
if (stripTrailingZeroes)
8383
{
84-
while (length > 0 && attributeValue[offset + length] == 0)
84+
while (length > 0 && attributeValue[offset + length - 1] == 0)
8585
{
8686
length--;
8787
}

0 commit comments

Comments
 (0)