- 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

View file

@ -95,7 +95,8 @@ void FResourceLump::LumpNameSetup(FString iname)
{
long slash = iname.LastIndexOf('/');
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);
Name[8] = 0;
FullName = iname;