diff --git a/app/SysTray-X/windowctrl-win.cpp b/app/SysTray-X/windowctrl-win.cpp index cc29d91..6e4b6b9 100644 --- a/app/SysTray-X/windowctrl-win.cpp +++ b/app/SysTray-X/windowctrl-win.cpp @@ -8,6 +8,11 @@ #include #include +/* + * Standard library includes + */ +#include + /* * Qt includes */ @@ -87,9 +92,9 @@ bool WindowCtrlWin::findWindow( const QString& title ) */ BOOL CALLBACK WindowCtrlWin::enumWindowsTitleProc( HWND hwnd, LPARAM lParam ) { - char buffer[ 128 ]; - int written = GetWindowTextA( hwnd, buffer, 128 ); - if( written && strstr( buffer, (char*)lParam ) != nullptr ) + std::array buffer; + int written = GetWindowTextA( hwnd, buffer.data(), int(buffer.size()) ); + if( written && strstr( buffer.data(), (char*)lParam ) != nullptr ) { m_tb_windows.append( (quint64)hwnd ); }