Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-05-24 01:15:33 +0400
committerFelix Fietkau <nbd@openwrt.org>2011-05-24 01:15:33 +0400
commit11079ba5829a4d14461612fe236d6584b53892c3 (patch)
tree937d6ad1c47032f736fc4b7d2669111f4412b948 /sh
parentcc2457aa3ee13b155cb095637ab0ee77c366e7d2 (diff)
jshn: fix invalid variable reuse
Diffstat (limited to 'sh')
-rw-r--r--sh/jshn.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/sh/jshn.sh b/sh/jshn.sh
index 5bd3896..b27d852 100644
--- a/sh/jshn.sh
+++ b/sh/jshn.sh
@@ -30,6 +30,8 @@ json_add_table() {
jshn_append JSON_STACK "$JSON_CUR"
local table="JSON_TABLE$JSON_SEQ"
export -- "UP_$table=$JSON_CUR"
+ export -- "KEYS_$table="
+ jshn_append JSON_UNSET "KEYS_$table UP_$table"
JSON_CUR="$table"
}
@@ -41,7 +43,6 @@ json_add_object() {
json_close_object() {
local oldstack="$JSON_STACK"
- export "KEYS_${JSON_CUR}"
JSON_CUR="${JSON_STACK##* }"
JSON_STACK="${JSON_STACK% *}"
[[ "$oldstack" == "$JSON_STACK" ]] && JSON_STACK=