@@ -144,7 +144,7 @@ var usagetype_position = [26]uint8{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
144144var addresstype_position = [26 ]uint8 {0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 21 }
145145var category_position = [26 ]uint8 {0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 22 }
146146
147- const api_version string = "9.4.0 "
147+ const api_version string = "9.4.1 "
148148
149149var max_ipv4_range = big .NewInt (4294967295 )
150150var max_ipv6_range = big .NewInt (0 )
@@ -327,7 +327,7 @@ func (d *DB) readstr(pos uint32) (string, error) {
327327 var retval string
328328 data := make ([]byte , readlen )
329329 _ , err := d .f .ReadAt (data , pos2 )
330- if err != nil {
330+ if err != nil && err . Error () != "EOF" { // bypass EOF error coz we are reading 256 which may hit EOF
331331 return "" , err
332332 }
333333 strlen := data [0 ]
@@ -902,7 +902,6 @@ func (d *DB) query(ipaddress string, mode uint32) (IP2Locationrecord, error) {
902902
903903 ipto32 := d .readuint32_row (fullrow , colsize )
904904 ipto = big .NewInt (int64 (ipto32 ))
905-
906905 } else {
907906 ipfrom = d .readuint128_row (fullrow , 0 )
908907
0 commit comments