From e35d36c90bea73e77975a300ae1f5dc897d74262 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Sun, 28 Mar 2021 13:00:16 +0200 Subject: Fix the tests --- gui/backend.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gui/backend.go') diff --git a/gui/backend.go b/gui/backend.go index f693118..d4f5738 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -32,7 +32,10 @@ func SwitchOff() { //export UseLocation func UseLocation(label string) { - backend.UseLocation(label) + // a bit of a hack to force the compiler to copy the string + // so the original C++ string will not be used as it will be changed down the line + location := string([]byte(label)) + backend.UseLocation(location) } //export UseAutomaticGateway -- cgit v1.2.3