Fix codegen hidden bugs
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
if (!list || !node || !(node->string)) {{
|
||||
if (!list || !node || !(node->item)) {{
|
||||
return;
|
||||
}}
|
||||
|
||||
if (index == 0) {{
|
||||
wapp_str8_list_push_front(list, node);
|
||||
wapp_{T}_list_push_front(list, node);
|
||||
return;
|
||||
}} else if (index == list->node_count) {{
|
||||
wapp_str8_list_push_back(list, node);
|
||||
wapp_{T}_list_push_back(list, node);
|
||||
return;
|
||||
}}
|
||||
|
||||
{T}Node *dst_node = wapp_str8_list_get(list, index);
|
||||
{T}Node *dst_node = wapp_{T}_list_get(list, index);
|
||||
if (!dst_node) {{
|
||||
return;
|
||||
}}
|
||||
|
||||
{T}List node_list = {Tlower}_node_to_list(node);
|
||||
|
||||
list->total_size += node_list.total_size;
|
||||
list->node_count += node_list.node_count;
|
||||
|
||||
{T}Node *prev = dst_node->prev;
|
||||
|
Reference in New Issue
Block a user