OSDN Git Service

Fix: OpenView does not accept Drag&Droped three files
authorsdottaka <none@none>
Sun, 21 Apr 2013 12:35:14 +0000 (21:35 +0900)
committersdottaka <none@none>
Sun, 21 Apr 2013 12:35:14 +0000 (21:35 +0900)
Src/OpenView.cpp

index 21c28ed..db48413 100644 (file)
@@ -934,7 +934,7 @@ void COpenView::OnDropFiles(HDROP dropInfo)
 {
        // Get the number of pathnames that have been dropped
        UINT wNumFilesDropped = DragQueryFile(dropInfo, 0xFFFFFFFF, NULL, 0);
-       CString files[2];
+       CString files[3];
        UINT fileCount = 0;
 
        // get all file names. but we'll only need the first one.
@@ -950,7 +950,7 @@ void COpenView::OnDropFiles(HDROP dropInfo)
                // Copy the pathname into the buffer
                DragQueryFile(dropInfo, x, npszFile.get(), wPathnameSize);
 
-               if (x < 2)
+               if (x < 3)
                {
                        files[x] = npszFile.get();
                        fileCount++;