1 Commits
Author SHA1 Message Date
mmacierzanka b32774b6f1 fixed heap overflow + minor tweaks (0.4.0) 2021-05-31 22:45:38 +02:00
2 changed files with 3 additions and 2 deletions

No files matched your search

BIN
View File
Binary file not shown.
+3 -2
View File
@@ -147,8 +147,7 @@ void UnloadSelection() {
int LoadSelection(int index) {
UnloadSelection();
if (index != -1) {
LRESULT selectedLength = SendMessage(filesListCtrl, LB_GETTEXTLEN, (WPARAM)index, NULL);
TCHAR* selectionBuffer = new TCHAR[selectedLength];
TCHAR* selectionBuffer = new TCHAR[MAX_PATH];
SendMessage(filesListCtrl, LB_GETTEXT, (WPARAM)index, (LPARAM)selectionBuffer);
if (!path.empty()) {
wstring fullPath = path + L"\\" + selectionBuffer;
@@ -331,6 +330,8 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
CheckMenuItem(menuBar, ID_OPCJE_LOOP, MF_CHECKED);
isLoopEnabled = TRUE;
}
isQueued = TRUE;
SendMessage(mainWindow, STATE_CHANGE, 1, NULL);
break;
case ID_POMOC_KBSHR:
MessageBox(mainWindow, L"F1 = ekran skrótów klawiszowych\nF2 = ekran Informacje\nF5 = odœwie¿ listê plików", L"Skróty klawiszowe", MB_ICONASTERISK);