Merge pull request #108041 from bs-mwoerner/cs_get_extension
C#: Fix return value of `StringExtensions.GetExtension()`
This commit is contained in:
commit
5aefc2eca8
1 changed files with 2 additions and 2 deletions
|
|
@ -430,8 +430,8 @@ namespace Godot
|
|||
{
|
||||
int pos = instance.RFind(".");
|
||||
|
||||
if (pos < 0)
|
||||
return instance;
|
||||
if (pos < 0 || pos < Math.Max(instance.RFind("/"), instance.RFind("\\")))
|
||||
return string.Empty;
|
||||
|
||||
return instance.Substring(pos + 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue