mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-31 04:50:48 +00:00
Use Truncate to chop off extension in LumpNameSetup.
- Left() always creates a new string. Truncate() can reuse the old one if it only has one reference.
This commit is contained in:
parent
4315423200
commit
6da887c34f
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ void FResourceLump::LumpNameSetup(FString iname)
|
||||||
{
|
{
|
||||||
long slash = iname.LastIndexOf('/');
|
long slash = iname.LastIndexOf('/');
|
||||||
FString base = (slash >= 0) ? iname.Mid(slash + 1) : iname;
|
FString base = (slash >= 0) ? iname.Mid(slash + 1) : iname;
|
||||||
base = base.Left(base.LastIndexOf('.'));
|
base.Truncate(base.LastIndexOf('.'));
|
||||||
uppercopy(Name, base);
|
uppercopy(Name, base);
|
||||||
Name[8] = 0;
|
Name[8] = 0;
|
||||||
FullName = iname;
|
FullName = iname;
|
||||||
|
|
Loading…
Reference in a new issue