[vlc-commits] qt: Fix GetLogicalDriveStrings usage
Hugo Beauzée-Luyssen
git at videolan.org
Tue Feb 14 15:30:40 CET 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Feb 14 14:38:13 2017 +0100| [ec697fe86e01f7b6135f8f379afed2457131a294] | committer: Hugo Beauzée-Luyssen
qt: Fix GetLogicalDriveStrings usage
The buffer size is expressed in TCHAR, not bytes
CID #1402735
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ec697fe86e01f7b6135f8f379afed2457131a294
---
modules/gui/qt/components/open_panels.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/gui/qt/components/open_panels.cpp b/modules/gui/qt/components/open_panels.cpp
index 6f8933f..505c216 100644
--- a/modules/gui/qt/components/open_panels.cpp
+++ b/modules/gui/qt/components/open_panels.cpp
@@ -381,7 +381,7 @@ void DiscOpenPanel::onFocus()
ui.deviceCombo->clear();
wchar_t szDrives[512];
szDrives[0] = '\0';
- if( GetLogicalDriveStringsW( sizeof( szDrives ) - 1, szDrives ) )
+ if( GetLogicalDriveStringsW( sizeof( szDrives ) / sizeof( *szDrives ) - 1, szDrives ) )
{
wchar_t *drive = szDrives;
UINT oldMode = SetErrorMode( SEM_FAILCRITICALERRORS );
More information about the vlc-commits
mailing list