Browse Source

Fix `ResolveCustomSource()` not always copying argument on failure

pull/8/head
Anton Tarasenko 2 years ago
parent
commit
40d35f4cfb
  1. 6
      sources/Aliases/AliasesAPI.uc

6
sources/Aliases/AliasesAPI.uc

@ -349,7 +349,11 @@ public final function Text ResolveCustom(
local BaseAliasSource customSource; local BaseAliasSource customSource;
customSource = GetCustomSource(sourceName); customSource = GetCustomSource(sourceName);
if (customSource == none) { if (customSource == none)
{
if (copyOnFailure && alias != none) {
return alias.Copy();
}
return none; return none;
} }
return ResolveWithSource(alias, customSource, copyOnFailure); return ResolveWithSource(alias, customSource, copyOnFailure);

Loading…
Cancel
Save