diff --git a/symbol.c b/symbol.c index edca3f5..b49e972 100644 --- a/symbol.c +++ b/symbol.c @@ -518,6 +518,7 @@ static void FreeNodesAtDepth(symbolNode_t **root, int depth) static void DeleteNode(symbolNode_t *node, symbolNode_t **parent_p) { symbolNode_t **temp; + char *nametemp; if(node->left == NULL) { @@ -553,7 +554,9 @@ static void DeleteNode(symbolNode_t *node, symbolNode_t **parent_p) temp = &(*temp)->left; } } + nametemp = node->name; node->name = (*temp)->name; + (*temp)->name = nametemp; node->type = (*temp)->type; node->unused = (*temp)->unused; node->imported = (*temp)->imported;