fix: Uses the correct index.

This commit is contained in:
Boris Grozev 2017-06-26 12:54:03 -05:00
parent feecacefc5
commit ed26be48d7

View File

@ -81,7 +81,7 @@ public class UsernameAttribute extends Attribute
{ {
if (stripTrailingZeroes) if (stripTrailingZeroes)
{ {
while (length > 0 && attributeValue[offset + length] == 0) while (length > 0 && attributeValue[offset + length - 1] == 0)
{ {
length--; length--;
} }