IP找不到不再提示错误

This commit is contained in:
刘祥超
2022-03-24 21:41:14 +08:00
parent 0ce1df25bc
commit 5f793f1f76

View File

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