IP找不到不再提示错误

This commit is contained in:
刘祥超
2022-03-24 21:41:32 +08:00
parent d1ea67581e
commit 99227bb4f2

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