From d296f9f99daf102b9af5d56690e2bd00d61c1267 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 24 Jul 2018 11:11:26 +0300 Subject: 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. --- plugins/Ping/src/pinglist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/Ping/src/pinglist.cpp') diff --git a/plugins/Ping/src/pinglist.cpp b/plugins/Ping/src/pinglist.cpp index d0edc89823..33c7f34388 100644 --- a/plugins/Ping/src/pinglist.cpp +++ b/plugins/Ping/src/pinglist.cpp @@ -116,13 +116,13 @@ bool read_ping_address(PINGADDRESS &pa) { DBVARIANT dbv; if (!db_get_ws(0, buff, "Address", &dbv)) { - mir_wstrncpy(pa.pszName, dbv.ptszVal, _countof(pa.pszName)); + mir_wstrncpy(pa.pszName, dbv.pwszVal, _countof(pa.pszName)); db_free(&dbv); } else return false; if (!db_get_ws(0, buff, "Label", &dbv)) { - mir_wstrncpy(pa.pszLabel, dbv.ptszVal, _countof(pa.pszLabel)); + mir_wstrncpy(pa.pszLabel, dbv.pwszVal, _countof(pa.pszLabel)); db_free(&dbv); } else return false; @@ -139,13 +139,13 @@ bool read_ping_address(PINGADDRESS &pa) { else pa.pszProto[0] = '\0'; if (!db_get_ws(0, buff, "Command", &dbv)) { - mir_wstrncpy(pa.pszCommand, dbv.ptszVal, _countof(pa.pszCommand)); + mir_wstrncpy(pa.pszCommand, dbv.pwszVal, _countof(pa.pszCommand)); db_free(&dbv); } else pa.pszCommand[0] = '\0'; if (!db_get_ws(0, buff, "CommandParams", &dbv)) { - mir_wstrncpy(pa.pszParams, dbv.ptszVal, _countof(pa.pszParams)); + mir_wstrncpy(pa.pszParams, dbv.pwszVal, _countof(pa.pszParams)); db_free(&dbv); } else -- cgit v1.2.3