[core] fixed some bugs

This commit is contained in:
tangxifan 2024-05-02 22:49:06 -07:00
parent 79c5c0a26a
commit f41a5e8b89
1 changed files with 5 additions and 10 deletions

View File

@ -108,18 +108,13 @@ static int rec_output_module_hierarchy_to_text_file(
}
if (hie_depth_to_stop == current_hie_depth || use_list) {
fp << "- ";
}
fp << module_name_map.name(module_manager.module_name(child_module));
/* If this is the leaf node, we leave a new line
* Otherwise, we will leave a ':' to be compatible to YAML file format
*/
if ((!module_manager.child_modules(child_module).empty()) &&
(hie_depth_to_stop >= current_hie_depth + 1)) {
fp << module_name_map.name(module_manager.module_name(child_module));
fp << "\n";
} else {
fp << module_name_map.name(module_manager.module_name(child_module));
fp << ":";
fp << "\n";
}
fp << "\n";
/* Go to next level */
int status = rec_output_module_hierarchy_to_text_file(
fp, hie_depth_to_stop,