mirror of https://github.com/adamdruppe/arsd.git
Merge pull request #333 from MrcSnm/patch-1
Remove null terminator from getFileName(Windows)
This commit is contained in:
commit
f6306d331f
|
@ -13546,8 +13546,12 @@ void getFileName(
|
|||
}
|
||||
ofn.lpstrFile = file.ptr;
|
||||
ofn.nMaxFile = file.length;
|
||||
if(openOrSave ? GetOpenFileName(&ofn) : GetSaveFileName(&ofn)) {
|
||||
onOK(makeUtf8StringFromWindowsString(ofn.lpstrFile));
|
||||
if(openOrSave ? GetOpenFileName(&ofn) : GetSaveFileName(&ofn))
|
||||
{
|
||||
string okString = makeUtf8StringFromWindowsString(ofn.lpstrFile);
|
||||
if(okString[$-1] == '\0')
|
||||
okString = okString[0..$-1];
|
||||
onOK(okString);
|
||||
} else {
|
||||
if(onCancel)
|
||||
onCancel();
|
||||
|
|
Loading…
Reference in New Issue