mirror of
https://github.com/encounter/decomp-toolkit.git
synced 2025-12-10 22:17:53 +00:00
Sanitize commas in auto-split names
This commit is contained in:
@@ -1476,8 +1476,8 @@ fn auto_unit_name(
|
|||||||
length_limit: 20,
|
length_limit: 20,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
// Also replace $ to avoid issues with build.ninja
|
// Also replace characters that break downstream tooling (build.ninja, linker, etc)
|
||||||
.replace('$', "_");
|
.replace(['$', ','], "_");
|
||||||
let mut unit_name = format!("auto_{}_{}", name, section_name.trim_start_matches('.'));
|
let mut unit_name = format!("auto_{}_{}", name, section_name.trim_start_matches('.'));
|
||||||
// Ensure the name is unique
|
// Ensure the name is unique
|
||||||
if unit_exists(&unit_name, obj, new_splits) {
|
if unit_exists(&unit_name, obj, new_splits) {
|
||||||
|
|||||||
Reference in New Issue
Block a user