diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-24 11:11:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-24 11:11:26 +0300 |
commit | d296f9f99daf102b9af5d56690e2bd00d61c1267 (patch) | |
tree | 39311caaf80abf0b47ecb78cf94dc8157b193575 /plugins/AvatarHistory/src | |
parent | ffc521e5d5e9bd66feb65afe0046b3fc7e073356 (diff) |
database:
- senseless fiels ptszVal removed from DBVARIANT, pwszVal is used instead;
- if you want db_get to return a string, you need to use db_get_s.
Diffstat (limited to 'plugins/AvatarHistory/src')
-rw-r--r-- | plugins/AvatarHistory/src/AvatarDlg.cpp | 2 | ||||
-rw-r--r-- | plugins/AvatarHistory/src/AvatarHistory.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index 01b4e143a2..3cd569c8ce 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -542,7 +542,7 @@ int ShowSaveDialog(HWND hwnd, wchar_t* fn, MCONTACT hContact) DBVARIANT dbvInitDir = { 0 };
if (!db_get_ws(hContact, MODULENAME, "SavedAvatarFolder", &dbvInitDir)) {
- ofn.lpstrInitialDir = dbvInitDir.ptszVal;
+ ofn.lpstrInitialDir = dbvInitDir.pwszVal;
db_free(&dbvInitDir);
}
else ofn.lpstrInitialDir = L".";
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index 27e525a38c..d15b8062bb 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -109,7 +109,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) CONTACTAVATARCHANGEDNOTIFICATION* avatar = (CONTACTAVATARCHANGEDNOTIFICATION*)lParam;
if (avatar == nullptr) {
- if (!ret || !mir_wstrcmp(dbvOldHash.ptszVal, L"-")) {
+ if (!ret || !mir_wstrcmp(dbvOldHash.pwszVal, L"-")) {
//avoid duplicate "removed avatar" notifications
//do not notify on an empty profile
ShowDebugPopup(hContact, L"AVH Debug", L"Removed avatar, no avatar before... skipping");
@@ -125,7 +125,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) ShowPopup(hContact, nullptr, opts.popup_removed);
}
else {
- if (ret && !mir_wstrcmp(dbvOldHash.ptszVal, avatar->hash)) {
+ if (ret && !mir_wstrcmp(dbvOldHash.pwszVal, avatar->hash)) {
// same avatar hash, skipping
ShowDebugPopup(hContact, L"AVH Debug", L"Hashes are the same... skipping");
db_free(&dbvOldHash);
|