瀏覽代碼

Fix 32-bit builds

Rod Hynes 11 月之前
父節點
當前提交
ca5fc873ba
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      psiphon/common/inproxy/api.go

+ 1 - 1
psiphon/common/inproxy/api.go

@@ -526,7 +526,7 @@ type ProxyQualityKey [36]byte
 func MakeProxyQualityKey(proxyID ID, proxyASN string) ProxyQualityKey {
 func MakeProxyQualityKey(proxyID ID, proxyASN string) ProxyQualityKey {
 	var key ProxyQualityKey
 	var key ProxyQualityKey
 	copy(key[0:32], proxyID[:])
 	copy(key[0:32], proxyID[:])
-	ASN, err := strconv.Atoi(proxyASN)
+	ASN, err := strconv.ParseInt(proxyASN, 10, 0)
 	if err != nil || ASN < 0 || ASN > math.MaxUint32 {
 	if err != nil || ASN < 0 || ASN > math.MaxUint32 {
 		// In cases including failed or misconfigured GeoIP lookups -- with
 		// In cases including failed or misconfigured GeoIP lookups -- with
 		// values such as server.GEOIP_UNKNOWN_VALUE or invalid AS numbers --
 		// values such as server.GEOIP_UNKNOWN_VALUE or invalid AS numbers --