From 2488ec8f3ef6d717bf1ffc86f5aa13b3f50677b2 Mon Sep 17 00:00:00 2001 From: ririxidev Date: Wed, 4 May 2022 17:16:25 +0200 Subject: [PATCH] fix(devtools): patch another location --- src/cmd/devtools.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/cmd/devtools.go b/src/cmd/devtools.go index 6cd3493c07..76f5427f62 100644 --- a/src/cmd/devtools.go +++ b/src/cmd/devtools.go @@ -45,9 +45,13 @@ func SetDevTools() { buf := new(bytes.Buffer) buf.ReadFrom(file) content := buf.String() - location := strings.LastIndex(content, "app-developer") - patchLocation := int64(location + 15) + firstLocation := strings.Index(content, "app-developer") + firstPatchLocation := int64(firstLocation + 14) - file.WriteAt([]byte{50}, patchLocation) + secondLocation := strings.LastIndex(content, "app-developer") + secondPatchLocation := int64(secondLocation + 15) + + file.WriteAt([]byte{50}, firstPatchLocation) + file.WriteAt([]byte{50}, secondPatchLocation) utils.PrintSuccess("Enabled DevTools!") }