mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 01:49:28 +00:00
global-functions: $ParseKeyValueStore: properly return boolean values
This commit is contained in:
parent
ba39c29648
commit
8212bd6c95
1 changed files with 2 additions and 0 deletions
|
|
@ -927,6 +927,8 @@
|
||||||
:if ([ :find $KeyValue "=" ]) do={
|
:if ([ :find $KeyValue "=" ]) do={
|
||||||
:local Key [ :pick $KeyValue 0 [ :find $KeyValue "=" ] ];
|
:local Key [ :pick $KeyValue 0 [ :find $KeyValue "=" ] ];
|
||||||
:local Value [ :pick $KeyValue ([ :find $KeyValue "=" ] + 1) [ :len $KeyValue ] ];
|
:local Value [ :pick $KeyValue ([ :find $KeyValue "=" ] + 1) [ :len $KeyValue ] ];
|
||||||
|
:if ($Value="true") do={ :set Value true; }
|
||||||
|
:if ($Value="false") do={ :set Value false; }
|
||||||
:set ($Result->$Key) $Value;
|
:set ($Result->$Key) $Value;
|
||||||
} else={
|
} else={
|
||||||
:set ($Result->$KeyValue) true;
|
:set ($Result->$KeyValue) true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue