summaryrefslogtreecommitdiff
path: root/gui/backend.go
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2021-03-28 13:00:16 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-05-04 14:58:39 +0200
commite35d36c90bea73e77975a300ae1f5dc897d74262 (patch)
tree5857e93267f41c806f5bb4365431647b630f8825 /gui/backend.go
parenta9f8f9d55277598636b680fd952755c5ecb46b8b (diff)
Fix the tests
Diffstat (limited to 'gui/backend.go')
-rw-r--r--gui/backend.go5
1 files changed, 4 insertions, 1 deletions
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