diff options
author | Andrew Sidwell <andy@entai.co.uk> | 2008-07-10 14:29:53 +0000 |
---|---|---|
committer | Andrew Sidwell <andy@entai.co.uk> | 2008-07-10 14:29:53 +0000 |
commit | ab35ba70b41a06cfd3d2bb92da0c34ccf9420fc1 (patch) | |
tree | 61f7543377a53a79663cbc9e6e4445dc28463704 /src/treebuilder/in_body.c | |
parent | d354b2d78f226b370fd6720ff84aa43bfa4d930d (diff) | |
download | libhubbub-ab35ba70b41a06cfd3d2bb92da0c34ccf9420fc1.tar.gz libhubbub-ab35ba70b41a06cfd3d2bb92da0c34ccf9420fc1.tar.bz2 |
Reset current_table properly after shuffling the stack.
svn path=/trunk/hubbub/; revision=4570
Diffstat (limited to 'src/treebuilder/in_body.c')
-rw-r--r-- | src/treebuilder/in_body.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/treebuilder/in_body.c b/src/treebuilder/in_body.c index 3658ebe..31df8fd 100644 --- a/src/treebuilder/in_body.c +++ b/src/treebuilder/in_body.c @@ -1685,6 +1685,16 @@ void aa_remove_element_stack_item(hubbub_treebuilder *treebuilder, /* Now, shuffle the stack up one, removing node in the process */ memmove(&stack[index], &stack[index + 1], (limit - index) * sizeof(element_context)); + + uint32_t t; + + /* Set current_table again properly */ + for (t = treebuilder->context.current_node; t != 0; t--) { + if (stack[t].type == TABLE) + break; + } + + treebuilder->context.current_table = t; } /** |