Ticket #761 (assigned enhancement: None)

Opened 3 years ago

Last modified 2 years ago

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  
    24082408    else 
    24092409      str = rtf; 
    24102410 
     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    } 
    24112421    char *szReturn = new char[str.length() + 1]; 
    24122422    strcpy(szReturn, str.c_str()); 
    24132423    szReturn[str.length()] = ' 

Change History

Changed 2 years ago by erijo

  • type changed from defect to enhancement
  • description modified (diff)
  • summary changed from smart+question to trim message

Changed 2 years ago by erijo

  • description modified (diff)
Note: See TracTickets for help on using tickets.