From f5e2750d3f0b36bae954360a1c15364fa179959c Mon Sep 17 00:00:00 2001 From: ypdn <106465805+ypdn@users.noreply.github.com> Date: Sat, 6 Apr 2024 18:18:17 +0300 Subject: [PATCH] sam: fix crash after r command (#114) --- cmd/sam/sam.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/sam/sam.go b/cmd/sam/sam.go index 594ca32..2223939 100644 --- a/cmd/sam/sam.go +++ b/cmd/sam/sam.go @@ -357,7 +357,7 @@ func edit(f *File, cmd rune) { if cmd == 'e' || cmd == 'I' { logdelete(f, Posn(0), f.b.nc) addr.r.p2 = f.b.nc - } else if f.b.nc != 0 || (f.name.s[0] != 0 && Strcmp(&genstr, &f.name) != 0) { + } else if f.b.nc != 0 || (f.name.s != nil && Strcmp(&genstr, &f.name) != 0) { empty = false } var err error