Make IW5 rawfile dumper sanitize names before dumping

This commit is contained in:
Jan 2021-07-23 19:39:35 +02:00
parent 16e7a2c471
commit df8e909736

View File

@ -17,7 +17,21 @@ bool AssetDumperRawFile::CanDumpAsRaw()
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)