Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/rarfilesource.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOctaneSnail <os@v12pwr.com>2012-01-28 16:09:22 +0400
committerOctaneSnail <os@v12pwr.com>2012-01-28 16:09:22 +0400
commitacdb4d5637ae60d38c48c0e4e6ed14a9e3a916f5 (patch)
tree6501798dc3cef9950d06caf0cf467f1c7abbbac5
parent86644904bd44c96a127f0bf1ef190e5edacf147e (diff)
Fix hang in file selector on unsupported files.
-rw-r--r--RFS.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/RFS.cpp b/RFS.cpp
index 8789080..0cb50a0 100644
--- a/RFS.cpp
+++ b/RFS.cpp
@@ -675,15 +675,15 @@ INT_PTR CALLBACK CRARFileSource::DlgFileList (HWND hwndDlg, UINT uMsg, WPARAM wP
while (file)
{
- if (file->unsupported)
- continue;
-
- len = (int) strlen (file->filename) + 1;
- tempString = new wchar_t [len];
- MultiByteToWideChar (CP_ACP, 0, file->filename, -1, tempString, len);
- index = ListBox_AddString (GetDlgItem (hwndDlg, IDC_FILELIST), tempString);
- ListBox_SetItemData(GetDlgItem (hwndDlg, IDC_FILELIST), index, file);
- delete [] tempString;
+ if (!file->unsupported)
+ {
+ len = (int) strlen (file->filename) + 1;
+ tempString = new wchar_t [len];
+ MultiByteToWideChar (CP_ACP, 0, file->filename, -1, tempString, len);
+ index = ListBox_AddString (GetDlgItem (hwndDlg, IDC_FILELIST), tempString);
+ ListBox_SetItemData(GetDlgItem (hwndDlg, IDC_FILELIST), index, file);
+ delete [] tempString;
+ }
file = file_list->Next (file);
}