Fixed QuoteString middle name initials

This commit is contained in:
Ianos Gnatiuc 2006-03-15 21:39:48 +00:00
parent a0e0915cfc
commit 39f7ca81d1
2 changed files with 16 additions and 3 deletions

View File

@ -10,6 +10,8 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________
- Fixed QuoteString middle name initials.
- Fix truncation of date&time in header view.
= Snapshot for the March 12, 2006.

View File

@ -663,7 +663,11 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
(mode == MODE_QUOTEBUF)) {
y = 0;
ptr = strskip_wht(oldmsg->By());
while(*ptr) {
bool flag = false;
while(*ptr)
{
while(not IsInitial(*ptr) and (*ptr != '@') and *ptr)
ptr++;
if(*ptr == '@')
@ -674,10 +678,17 @@ int TemplateToText(int mode, GMsg* msg, GMsg* oldmsg, const char* tpl, int origa
if (y == 0)
{
initials[y++] = *ptr++;
if (*ptr) initials[y++] = *ptr++;
if (IsInitial(*ptr))
initials[y++] = *ptr++;
else
flag = true;
}
else if (y == 2)
else if ((y == 2) && !flag)
{
initials[y-1] = *ptr++;
flag = true;
}
else if (y == 9)
break;
else