From 5e6231c738e06052becded238920b24941cdb6f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Tue, 12 Jan 2021 17:38:32 +0100 Subject: [PATCH] Fix zero byte index computation. --- source/vibe/core/file.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/vibe/core/file.d b/source/vibe/core/file.d index cd0b55b..a69b861 100644 --- a/source/vibe/core/file.d +++ b/source/vibe/core/file.d @@ -1033,7 +1033,7 @@ private void performListDirectory(ListDirectoryRequest req) continue; FileInfo fi; - auto zi = de.d_name[].countUntil(0); + auto zi = de.d_name[].representation.countUntil(0); if (zi < 0) zi = de.d_name.length; if (de.d_name[0 .. zi].among(".", "..")) continue;