aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-10-16 23:38:06 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-10-16 23:43:58 +0200
commit140ec1a3a26af52572e755c126323097e56a4faa (patch)
treeb8848442c2ff1019c27993cb396f9534a1b8a73c /global-functions.rsc
parentfed7f2da46fc02b12d23c0f05111452b8e9935e6 (diff)
global-functions: $ParseJson: use temporary variables
Diffstat (limited to 'global-functions.rsc')
-rw-r--r--global-functions.rsc8
1 files changed, 5 insertions, 3 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index 4617a3a..d510ff9 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -715,11 +715,13 @@
}
} else={
:local Key ($Input->$I);
- :if ($Input->($I + 1) = ":") do={
- :set ($Return->$Key) ($Input->($I + 2));
+ :local Val1 ($Input->($I + 1));
+ :local Val2 ($Input->($I + 2));
+ :if ($Val1 = ":") do={
+ :set ($Return->$Key) $Val2;
:set Skip 2;
} else={
- :set ($Return->$Key) [ :pick ($Input->($I + 1)) 1 [ :len ($Input->($I + 1)) ] ];
+ :set ($Return->$Key) [ :pick $Val1 1 [ :len $Val1 ] ];
:set Skip 1;
}
}