Ticket #1013 (closed defect: Fixed)
Corrupted forwarded mail messages (forwarder 0.66)
| Reported by: | nobody | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | None | Version: | |
| Keywords: | Cc: |
Description
The forwarder 0.66 corrupts the messages when forwarding to mail The problem lies with in /<licqbase>/src/translate.cpp
Possible fix: //-----NToRN-------------------------------------------------------------------- char *CTranslator::NToRN(const char *_szOldStr) // convert a unix style string (0x0A for returns) to a dos style string (0x0A 0x0D) // also encodes the string if necessary {
if (_szOldStr == NULL) return NULL; unsigned short nLen = strlen(_szOldStr);
// lines added
unsigned long nCount = 0; for(unsigned long i = 0; i < nLen; i++) {
if(_szOldStr[i] == (char)0x0A) nCount++;
}
// line changed
char *szNewStr = new char[(nLen + nCount) + 1];
unsigned long j = 0; for (unsigned long i = 0; i <= nLen; i++) {
if (_szOldStr[i] == (char)0x0A) szNewStr[j++] = 0x0D; szNewStr[j++] = _szOldStr[i];
} return (szNewStr);
}
