mirror of https://github.com/adamdruppe/arsd.git
length check jic
This commit is contained in:
parent
f6306d331f
commit
047f937bb9
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue