Skip to content

Commit 1b12c7d

Browse files
author
Paul DeMarco
authored
Merge pull request pauldemarco#90 from assumptionsoup/issue66
Fix for OutOfBounds error on long device name advertisement
2 parents 6d9a72e + 85d17d1 commit 1b12c7d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

android/src/main/java/com/pauldemarco/flutterblue/AdvertisementParser.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ static AdvertisementData parse(byte[] rawData) {
6868
case 0x09: { // Long local name.
6969
if (seenLongLocalName) {
7070
// Prefer the long name over the short.
71+
data.position(data.position() + length);
7172
break;
7273
}
7374
byte[] name = new byte[length];

0 commit comments

Comments
 (0)