Skip to content

Commit

Permalink
Fix length check
Browse files Browse the repository at this point in the history
  • Loading branch information
rameel committed Aug 3, 2024
1 parent 9d21dad commit a7535fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Ramstack.Globbing/Traversal/FileTreeEnumerable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private IEnumerable<TResult> Enumerate()
private static ReadOnlySpan<char> GetFullName(ref char[] chars, string path, string name)
{
var length = path.Length + name.Length + 1;
if (chars.Length <= length)
if (chars.Length < length)
{
ArrayPool<char>.Shared.Return(chars);
chars = ArrayPool<char>.Shared.Rent(length);
Expand Down

0 comments on commit a7535fe

Please sign in to comment.