oschwald / maxminddb-golang

MaxMind DB Reader for Go
ISC License
597 stars 101 forks source link

Fix anonymous field index in range clause. #42

Closed abursavich closed 6 years ago

abursavich commented 6 years ago

Given the anonymousFields value []int{4, 5}, struct fields 0 and 1 were being decoded into instead of 4 and 5.

abursavich commented 6 years ago

FWIW, I didn't hit this bug in practice. I was just reading through the code.

oschwald commented 6 years ago

:100: Nice catch! I updated the tests so that this is tested as well.