Skip to content

Commit

Permalink
Bug-fix out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
mileusna committed Apr 14, 2023
1 parent 6591a7f commit a8f585b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ua.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ func findVersion(s string) string {
// findAndroidDevice in tokens
func (p *properties) findAndroidDevice(startIndex int) string {
for i := startIndex; i < startIndex+1; i++ {
if len(p.list) > i {
if len(p.list) > i+1 {
dev := p.list[i+1].Key
if len(dev) == 2 || (len(dev) == 5 && dev[2] == '-') {
// probably langage tag (en-us etc..), ignore and continue loop
Expand Down

0 comments on commit a8f585b

Please sign in to comment.