cmd/internal/obj/wasm: use p.To instead of p.From

Change-Id: Ib8f40f3daac169d03d8ac18d429049a3dc337834
GitHub-Last-Rev: 4db8afb7b3
GitHub-Pull-Request: golang/go#78799
Reviewed-on: https://go-review.googlesource.com/c/go/+/767782
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Weixie Cui 2026-04-16 14:40:13 +00:00 committed by Gopher Robot
parent d44e4e062b
commit 4c6ba57ea7

View file

@ -1331,7 +1331,7 @@ func assemble(ctxt *obj.Link, s *obj.LSym, newprog obj.ProgAlloc) {
if p.To.Offset < 0 {
panic("negative offset")
}
if p.From.Offset > math.MaxUint32 {
if p.To.Offset > math.MaxUint32 {
ctxt.Diag("bad offset in %v", p)
}
writeUleb128(w, align(p.As))