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/Spamotron/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/Spamotron/src')
-rw-r--r-- | plugins/Spamotron/src/options.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Spamotron/src/options.cpp b/plugins/Spamotron/src/options.cpp index bb2a2d15db..8f2761300f 100644 --- a/plugins/Spamotron/src/options.cpp +++ b/plugins/Spamotron/src/options.cpp @@ -9,7 +9,7 @@ wchar_t* _getCOptS(wchar_t *buf, unsigned int buflen, MCONTACT hContact, const c if (db_get_ws(hContact, MODULENAME, option, &dbv) != 0)
wcsncpy(buf, def, min(buflen, mir_wstrlen(def)+1));
else if (dbv.type == DBVT_WCHAR) {
- wcsncpy(buf, dbv.ptszVal, min(buflen, mir_wstrlen(dbv.ptszVal)+1));
+ wcsncpy(buf, dbv.pwszVal, min(buflen, mir_wstrlen(dbv.pwszVal)+1));
}
db_free(&dbv);
return buf;
@@ -22,7 +22,7 @@ wchar_t* _getMOptS(wchar_t *buf, unsigned int buflen, const char* module, const if (db_get_s(NULL, module, option, &dbv) != 0)
wcsncpy(buf, def, min(buflen, mir_wstrlen(def)+1));
else if (dbv.type == DBVT_WCHAR) {
- wcsncpy(buf, dbv.ptszVal, min(buflen, mir_wstrlen(dbv.ptszVal)+1));
+ wcsncpy(buf, dbv.pwszVal, min(buflen, mir_wstrlen(dbv.pwszVal)+1));
} else {
tmp = mir_a2u(dbv.pszVal);
wcsncpy(buf, tmp, min(buflen, mir_wstrlen(tmp)+1));
|