Ticket #761 (assigned enhancement: None)
trim message
| Reported by: | prior | Owned by: | emostar |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | licq daemon | Version: | |
| Keywords: | Cc: |
Description (last modified by erijo) (diff)
it is annoying, when i receive a message from a windows user. windows-icq sends an extra CRLF at the end of the message.
it looks like this:
(23:33:24) [D---] windows: test123 (23:33:39) [D---] windows: test456 (23:33:57) [D---] windows: test789 (23:37:33) [D---] me: foo (23:37:42) [D---] me: bar (23:37:55) [D---] me: meep
i've written a small patch:
-
rtf.cc
old new 2408 2408 else 2409 2409 str = rtf; 2410 2410 2411 uint32_t i = str.find_first_not_of(" "); 2412 if (i != 0) { 2413 str.erase(0, i); 2414 } 2415 if (str.size() > 0) { 2416 i = str.find_last_not_of(" "); 2417 if (i != str.size() - 1) { 2418 str.erase(i + 1, string::npos); 2419 } 2420 } 2411 2421 char *szReturn = new char[str.length() + 1]; 2412 2422 strcpy(szReturn, str.c_str()); 2413 2423 szReturn[str.length()] = '
Change History
Note: See
TracTickets for help on using
tickets.
