mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
C#: Fix length/emptiness checks
This commit is contained in:
@@ -65,7 +65,7 @@ namespace Semmle.Extraction.CIL.Entities
|
||||
|
||||
static Namespace? createParentNamespace(Context cx, string fqn)
|
||||
{
|
||||
if (fqn == "") return null;
|
||||
if (fqn.Length == 0) return null;
|
||||
var i = fqn.LastIndexOf('.');
|
||||
return i == -1 ? cx.GlobalNamespace : cx.Populate(new Namespace(cx, fqn.Substring(0, i)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user