From 1f91ea192b7cbc5265e9bca4c69fcbc157402cfa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Nov 2014 11:37:05 +0000 Subject: warning fix git-svn-id: http://svn.miranda-ng.org/main/trunk@11170 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NotesAndReminders/src/notes.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'plugins/NotesAndReminders/src') diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index 6f5af06b18..e9d7fdae54 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -1107,15 +1107,14 @@ static BOOL GetClipboardText_Title(char *pOut, int size) while (*buffer && isspace(*buffer)) buffer++; - char *p; - int n = strlen(buffer); + size_t n = strlen(buffer); if (n >= size) n = size-1; memcpy(pOut, buffer, n); pOut[n] = 0; // end string on line break and convert tabs to spaces - p = pOut; + char *p = pOut; while (*p) { if (*p == '\r' || *p == '\n') @@ -1132,10 +1131,8 @@ static BOOL GetClipboardText_Title(char *pOut, int size) } // trim trailing white spaces - while (n && isspace(pOut[n-1])) - pOut[--n] = 0; - - if (n) + rtrim(pOut); + if (pOut[0]) bResult = TRUE; GlobalUnlock(hData); -- cgit v1.2.3