]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/dirctrlg.cpp
using new API (no visual difference)
[wxWidgets.git] / src / generic / dirctrlg.cpp
index 43d34ec9430723d18844bbfe2af7897c4737e523..b631aa69cd16e88d791066064466ce864fd66a38 100644 (file)
@@ -118,8 +118,9 @@ size_t wxGetAvailableDrives(wxArrayString &paths, wxArrayString &names, wxArrayI
         name.Printf(wxT("%c:"), driveBuffer[i]);
 
 #if !defined(__WXWINCE__)
-        wxChar pname[52];
-        if (GetVolumeInformation( path.c_str(), pname, 52, NULL, NULL, NULL, NULL, 0 ))
+        wxChar pname[52]; // FIXME: why 52 and not MAX_PATH or whatever?
+        if ( GetVolumeInformation(path, pname, WXSIZEOF(pname),
+                                  NULL, NULL, NULL, NULL, 0) )
         {
             name << _T(' ') << pname;
         }