summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-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