From 047f937bb9ba7724698e84cf184399f82f1ad31f Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Fri, 24 Jun 2022 15:27:21 -0400 Subject: [PATCH] length check jic --- minigui.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minigui.d b/minigui.d index bde8b73..8d87c45 100644 --- a/minigui.d +++ b/minigui.d @@ -13549,7 +13549,7 @@ void getFileName( if(openOrSave ? GetOpenFileName(&ofn) : GetSaveFileName(&ofn)) { string okString = makeUtf8StringFromWindowsString(ofn.lpstrFile); - if(okString[$-1] == '\0') + if(okString.length && okString[$-1] == '\0') okString = okString[0..$-1]; onOK(okString); } else {