summaryrefslogtreecommitdiff
path: root/protocols/Weather/src/weather_popup.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-04-03 13:55:34 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-04-03 13:55:34 +0300
commitf46c2504821b4c5cb03d04a2ac6cf02ddec7ce99 (patch)
treee54a26ea02a0149226032131aa7e07d91a6e18a3 /protocols/Weather/src/weather_popup.cpp
parent3ee53558d61ce75746f28c4a36255241895a98cb (diff)
static buffers are evil
Diffstat (limited to 'protocols/Weather/src/weather_popup.cpp')
-rw-r--r--protocols/Weather/src/weather_popup.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/Weather/src/weather_popup.cpp b/protocols/Weather/src/weather_popup.cpp
index 91dcf51cb9..b9f938e41d 100644
--- a/protocols/Weather/src/weather_popup.cpp
+++ b/protocols/Weather/src/weather_popup.cpp
@@ -120,8 +120,8 @@ int CWeatherProto::WeatherPopup(MCONTACT hContact, bool bAlways)
POPUPDATAW ppd;
ppd.lchContact = hContact;
ppd.PluginData = ppd.lchIcon = GetStatusIcon(winfo.hContact);
- GetDisplay(&winfo, GetTextValue('P'), ppd.lpwzContactName);
- GetDisplay(&winfo, GetTextValue('p'), ppd.lpwzText);
+ wcsncpy_s(ppd.lpwzContactName, GetDisplay(&winfo, GetTextValue('P')), _TRUNCATE);
+ wcsncpy_s(ppd.lpwzText, GetDisplay(&winfo, GetTextValue('p')), _TRUNCATE);
ppd.PluginWindowProc = PopupDlgProc;
ppd.colorBack = (opt.UseWinColors) ? GetSysColor(COLOR_BTNFACE) : opt.BGColour;
ppd.colorText = (opt.UseWinColors) ? GetSysColor(COLOR_WINDOWTEXT) : opt.TextColour;