- fixed: FResourceLump::LumpNameSetup passed negative numbers to FString::Truncate for extension-less lump names.

This commit is contained in:
Christoph Oelckers 2016-11-12 14:01:34 +01:00
parent ffea457d81
commit 32e0123e1b
1 changed files with 2 additions and 1 deletions

View File

@ -95,7 +95,8 @@ 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.Truncate(base.LastIndexOf('.')); auto dot = base.LastIndexOf('.');
if (dot >= 0) base.Truncate(dot);
uppercopy(Name, base); uppercopy(Name, base);
Name[8] = 0; Name[8] = 0;
FullName = iname; FullName = iname;