From 5c8460c70dac107e144ec86fb785b46b57e73b75 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 16 May 2015 18:41:07 +0000 Subject: fix for strncat use git-svn-id: http://svn.miranda-ng.org/main/trunk@13645 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SendScreenshotPlus/src/UMainForm.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp index c77c1a4e32..ddbf45184d 100644 --- a/plugins/SendScreenshotPlus/src/UMainForm.cpp +++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp @@ -910,8 +910,8 @@ void TfrmMain::edtSizeUpdate(HWND hWnd, BOOL ClientArea, HWND hTarget, UINT Ctrl _itot(rect.right - rect.left, B, 10); // _itot_s(rect.bottom - rect.top, H, 16, 10); _itot(rect.bottom - rect.top, H, 10); - mir_tstrncat(B, _T("x"), 33); - mir_tstrncat(B, H, 33); + mir_tstrncat(B, _T("x"), SIZEOF(B) - mir_tstrlen(B)); + mir_tstrncat(B, H, SIZEOF(B) - mir_tstrlen(B)); SetDlgItemText(hTarget, Ctrl, B); } @@ -921,8 +921,8 @@ void TfrmMain::edtSizeUpdate(RECT rect, HWND hTarget, UINT Ctrl) { _itot(ABS(rect.right - rect.left), B, 10); // _itot_s(ABS(rect.bottom - rect.top), H, 16, 10); _itot(ABS(rect.bottom - rect.top), H, 10); - mir_tstrncat(B, _T("x"), 33); - mir_tstrncat(B, H, 33); + mir_tstrncat(B, _T("x"), SIZEOF(B) - mir_tstrlen(B)); + mir_tstrncat(B, H, SIZEOF(B) - mir_tstrlen(B)); SetDlgItemText(hTarget, Ctrl, B); } -- cgit v1.2.3