summaryrefslogtreecommitdiff
path: root/plugins/QuickSearch
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-11-28 13:03:24 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-11-28 13:03:24 +0300
commitecd21a62f266989f6b5f859a167b834af279d031 (patch)
treefaab55e97b00a6c0da0fc506e7e6c97eb8950f15 /plugins/QuickSearch
parentcb73d3cc19a6f27185c5228ce604312fc3203797 (diff)
QuickSearch: fix for reading garbage flags from database
Diffstat (limited to 'plugins/QuickSearch')
-rw-r--r--plugins/QuickSearch/src/utils.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/QuickSearch/src/utils.cpp b/plugins/QuickSearch/src/utils.cpp
index eb450e9db1..29fb4a4c2e 100644
--- a/plugins/QuickSearch/src/utils.cpp
+++ b/plugins/QuickSearch/src/utils.cpp
@@ -310,9 +310,14 @@ void CMPlugin::LoadColumn(int n, ColumnItem &col)
strcpy(buf + offset, so_title); col.title = getWStringA(buf);
strcpy(buf + offset, so_setting_type); col.setting_type = getWord(buf);
- strcpy(buf + offset, so_flags); col.dwFlags = getWord(buf);
strcpy(buf + offset, so_width); col.width = getWord(buf);
+ strcpy(buf + offset, so_flags);
+ uint16_t wFlags = getWord(buf);
+ col.bEnabled = (wFlags & 1) != 0;
+ col.bFilter = (wFlags & 4) != 0;
+ col.SetSpecialColumns();
+
switch (col.setting_type) {
case QST_SETTING:
strcpy(buf + offset, so_datatype); col.datatype = getWord(buf);