aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-07-02 00:14:08 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-07-02 00:41:37 +0200
commit2aaea7c58e88ffa5df1daea1bc4da35a8f10811f (patch)
tree3a1bed454eb2ff975a201a91fd1a97068b1ea65e /global-functions
parent5b03ae4fa2a914c589a83add2a30549fa4847227 (diff)
global-functions: $ParseKeyValueStore: key without value for boolean true
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions8
1 files changed, 6 insertions, 2 deletions
diff --git a/global-functions b/global-functions
index c66f39f..a2a2ab4 100644
--- a/global-functions
+++ b/global-functions
@@ -431,8 +431,12 @@
}
:local Result [ :toarray "" ];
:foreach KeyValue in=[ :toarray $Source ] do={
- :set KeyValue [ :toarray [ $CharacterReplace $KeyValue "=" "," ] ];
- :set ($Result->($KeyValue->0)) ($KeyValue->1);
+ :if ([ :find $KeyValue "=" ]) do={
+ :set KeyValue [ :toarray [ $CharacterReplace $KeyValue "=" "," ] ];
+ :set ($Result->($KeyValue->0)) ($KeyValue->1);
+ } else={
+ :set ($Result->$KeyValue) true;
+ }
}
:return $Result;
}