Ver Fonte

Moves the path return from fileDialog through the returnBuffer so it doesn't get mangled or corrupted in memory inadvertently.

Areloch há 6 anos atrás
pai
commit
6ae3076ab7
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      Engine/source/platform/nativeDialogs/fileDialog.cpp

+ 2 - 2
Engine/source/platform/nativeDialogs/fileDialog.cpp

@@ -285,9 +285,9 @@ bool FileDialog::Execute()
    {
    {
       // Single file selection, do it the easy way
       // Single file selection, do it the easy way
       if(mForceRelativePath)
       if(mForceRelativePath)
-         mData.mFile = Platform::makeRelativePathName(resultPath.c_str(), NULL);
+         mData.mFile = Con::getReturnBuffer(Platform::makeRelativePathName(resultPath.c_str(), NULL));
       else
       else
-         mData.mFile = resultPath.c_str();
+         mData.mFile = Con::getReturnBuffer(resultPath.c_str());
    }
    }
    else if (mData.mStyle & FileDialogData::FDS_MULTIPLEFILES)
    else if (mData.mStyle & FileDialogData::FDS_MULTIPLEFILES)
    {
    {