aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/syntax/highlighter.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-10-12 11:44:08 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2021-10-12 11:44:08 -0600
commitd0663c3c94ba75a6d11312fd24dfd2713c9b431b (patch)
tree5a968153526b7e898f46405dd09f0a3e97171909 /ui/syntax/highlighter.go
parentmanager: use newer wireguard-go APIs (diff)
downloadwireguard-windows-d0663c3c94ba75a6d11312fd24dfd2713c9b431b.tar.xz
wireguard-windows-d0663c3c94ba75a6d11312fd24dfd2713c9b431b.zip
global: use unsafe.Add where possible
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--ui/syntax/highlighter.go2
1 files changed, 1 insertions, 1 deletions
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 {