From dcb9882978986be266cb3702be9ff17e66144bd2 Mon Sep 17 00:00:00 2001 From: Maddie Zhan Date: Fri, 21 May 2021 14:21:45 +0800 Subject: [PATCH] Allow negative coordinates Fixes #25 --- web/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/helpers.go b/web/helpers.go index d982ee7..3863786 100644 --- a/web/helpers.go +++ b/web/helpers.go @@ -68,7 +68,7 @@ func getIPInfo(addr string) results.IPInfoResponse { } func SetServerLocation(conf *config.Config) { - if conf.ServerLat > 0 && conf.ServerLng > 0 { + if conf.ServerLat != 0 || conf.ServerLng != 0 { log.Infof("Configured server coordinates: %.6f, %.6f", conf.ServerLat, conf.ServerLng) serverCoord.Lat = conf.ServerLat serverCoord.Lon = conf.ServerLng