IP找不到不再提示错误

This commit is contained in:
GoEdgeLab
2022-03-24 21:41:32 +08:00
parent 7dc8f81dfc
commit ee8bafd98d

View File

@@ -99,7 +99,7 @@ func (this *IP2Region) MemorySearch(ipStr string) (ipInfo *IpInfo, err error) {
}
}
if dataPtr == 0 {
return nil, errors.New("not found")
return nil, nil
}
dataLen := (dataPtr >> 24) & 0xFF