From 82c529fbc16afd118509e5805d26ca2cd79e2ab4 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sat, 10 Jan 2015 12:48:20 +0000 Subject: SMS: - Fixed potentially uninitialized variables git-svn-id: http://svn.miranda-ng.org/main/trunk@11813 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SMS/src/recvdlg.cpp | 1 + plugins/SMS/src/senddlg.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/SMS/src/recvdlg.cpp b/plugins/SMS/src/recvdlg.cpp index 5a02b133bf..0409ba6693 100644 --- a/plugins/SMS/src/recvdlg.cpp +++ b/plugins/SMS/src/recvdlg.cpp @@ -208,6 +208,7 @@ HWND RecvSMSWindowAdd(MCONTACT hContact,DWORD dwEventType,LPWSTR lpwszPhone,size break; default: lpwszTitlepart=_T("Unknown event type"); + hIcon = 0; } wszPhoneLocal[0]='+'; diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp index d8bbc9b8ce..f1784145b3 100644 --- a/plugins/SMS/src/senddlg.cpp +++ b/plugins/SMS/src/senddlg.cpp @@ -142,8 +142,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l SendSMSWindowUpdateAccountList(hWndDlg); { - TCHAR tszSign[1024]; - size_t dwSignLen; + size_t dwSignLen = 0; if (DB_SMS_GetByte(NULL,"UseSignature",SMS_DEFAULT_USESIGNATURE)) if (DB_SMS_GetStaticStringW(NULL,"Signature",tszSign,SIZEOF(tszSign),&dwSignLen)) @@ -154,6 +153,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l EnableWindow(GetDlgItem(hWndDlg,IDOK),dwSignLen); } + TCHAR tszSign[1024]; mir_sntprintf(tszSign,SIZEOF(tszSign),_T("%d/%d"),dwSignLen,GetSMSMessageLenMax(hWndDlg)); SetDlgItemText(hWndDlg,IDC_COUNT,tszSign); } -- cgit v1.2.3