projects
/
project
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc2457a
)
jshn: fix invalid variable reuse
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 23 May 2011 21:15:33 +0000
(23:15 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 23 May 2011 21:15:33 +0000
(23:15 +0200)
sh/jshn.sh
patch
|
blob
|
history
diff --git
a/sh/jshn.sh
b/sh/jshn.sh
index 5bd38968b14704d5a08de08b44b0de1eeb06785d..b27d8525d552afe1fc581e66e739553ac9b7a4ee 100644
(file)
--- 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=