From 5bcdede67b139fdec2620bd37ca71c0a885e0e13 Mon Sep 17 00:00:00 2001 From: Howard Wu Date: Mon, 14 Sep 2026 15:02:36 +1200 Subject: [PATCH 1/2] fix: nzmap slice index out of bound --- map180/nzmap/nzmap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/map180/nzmap/nzmap.go b/map180/nzmap/nzmap.go index 9b554c44..babe53f5 100644 --- a/map180/nzmap/nzmap.go +++ b/map180/nzmap/nzmap.go @@ -261,7 +261,7 @@ func (pts Points) Medium(b *bytes.Buffer) { yi, yf := math.Modf(v.Latitude*10 + 480.0) y := int(yi) - if x >= 0 && x < 150 && y >= 0 && y < 140 { + if x >= 0 && x < 150 && y >= 0 && y < 139 { p = nzMediumPts[int(x)][y] pp = nzMediumPts[x+1][y+1] pts[i].x = p.x + int(float64(pp.x-p.x)*xf) From 5c441f7935aedd476bafc08f9fd9814eec08d034 Mon Sep 17 00:00:00 2001 From: Howard Wu Date: Mon, 14 Sep 2026 15:10:17 +1200 Subject: [PATCH 2/2] fix: gofmt --- weft/assets_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weft/assets_test.go b/weft/assets_test.go index 94fee489..57b748c7 100644 --- a/weft/assets_test.go +++ b/weft/assets_test.go @@ -331,7 +331,7 @@ func TestCreateImportTag(t *testing.T) { "No nonce, one module file", "", map[string]*asset{ - "test.mjs": &asset{ + "test.mjs": { hashedPath: "/assets/js/hashprefix-test.mjs", sri: "sha384-abcd", }, @@ -351,11 +351,11 @@ func TestCreateImportTag(t *testing.T) { "Nonce present, two module files", "abcdefg", map[string]*asset{ - "test1.mjs": &asset{ + "test1.mjs": { hashedPath: "/assets/js/hashprefix-test1.mjs", sri: "sha384-efgh", }, - "test2.mjs": &asset{ + "test2.mjs": { hashedPath: "/assets/js/hashprefix-test2.mjs", sri: "sha384-ijkl", },