From d0663c3c94ba75a6d11312fd24dfd2713c9b431b Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 12 Oct 2021 11:44:08 -0600 Subject: global: use unsafe.Add where possible Signed-off-by: Jason A. Donenfeld --- ui/syntax/highlighter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/syntax/highlighter.go') diff --git a/ui/syntax/highlighter.go b/ui/syntax/highlighter.go index a531854b..47946093 100644 --- a/ui/syntax/highlighter.go +++ b/ui/syntax/highlighter.go @@ -62,7 +62,7 @@ type stringSpan struct { } func (s stringSpan) at(i int) *byte { - return (*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(s.s)) + uintptr(i))) + return (*byte)(unsafe.Add(unsafe.Pointer(s.s), uintptr(i))) } func (s stringSpan) isSame(c string) bool { -- cgit v1.2.3-59-g8ed1b