mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
Make IW5 rawfile dumper sanitize names before dumping
This commit is contained in:
parent
16e7a2c471
commit
df8e909736
@ -17,7 +17,21 @@ bool AssetDumperRawFile::CanDumpAsRaw()
|
|||||||
|
|
||||||
std::string AssetDumperRawFile::GetFileNameForAsset(Zone* zone, XAssetInfo<RawFile>* asset)
|
std::string AssetDumperRawFile::GetFileNameForAsset(Zone* zone, XAssetInfo<RawFile>* asset)
|
||||||
{
|
{
|
||||||
return asset->m_name;
|
std::string cleanAssetName = asset->m_name;
|
||||||
|
for (auto& c : cleanAssetName)
|
||||||
|
{
|
||||||
|
switch (c)
|
||||||
|
{
|
||||||
|
case '*':
|
||||||
|
c = '_';
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return cleanAssetName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssetDumperRawFile::DumpRaw(AssetDumpingContext& context, XAssetInfo<RawFile>* asset, std::ostream& stream)
|
void AssetDumperRawFile::DumpRaw(AssetDumpingContext& context, XAssetInfo<RawFile>* asset, std::ostream& stream)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user