diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 11:37:05 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 11:37:05 +0000 |
commit | 1f91ea192b7cbc5265e9bca4c69fcbc157402cfa (patch) | |
tree | a03fb2ce7f3d887d516817eed36a7c26fc45a91d /plugins/NotesAndReminders | |
parent | 389916d6810e52a2d8e5676248684788ef17e42a (diff) |
warning fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@11170 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NotesAndReminders')
-rw-r--r-- | plugins/NotesAndReminders/src/notes.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
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); |