... | ... |
@@ -29,7 +29,8 @@ function xmlgetnext () { |
29 | 29 |
# to avoid infinite loops at end of file parsing we return an error |
30 | 30 |
# the next time we find an empty TAG |
31 | 31 |
if test -z "$TAG"; then |
32 |
- test ${xmlgetnext_firstentry:-1} -eq 1 && xmlgetnext_firstentry=0 || return 1; |
|
32 |
+ test ${xmlgetnext_empty_tag:-0} -gt 0 && return 1 |
|
33 |
+ xmlgetnext_empty_tag=$(( xmlgetnext_empty_tag + 1 )) |
|
33 | 34 |
fi |
34 | 35 |
# process $TAG only if necessary |
35 | 36 |
local _TAG=$(printf '%q' $TAG) |
... | ... |
@@ -185,7 +186,7 @@ function update_database () { |
185 | 186 |
register_state |
186 | 187 |
fi |
187 | 188 |
xmlremovecomments |
188 |
- unset xmlgetnext_firstentry property |
|
189 |
+ unset xmlgetnext_empty_tag property |
|
189 | 190 |
while xmlgetnext; do |
190 | 191 |
case "${TAG:0:1}" in |
191 | 192 |
''|'?'|'!') |