From 39f7ca81d1b0f33c4664fc3ce8edd983bc187b6d Mon Sep 17 00:00:00 2001 From: Ianos Gnatiuc Date: Wed, 15 Mar 2006 21:39:48 +0000 Subject: [PATCH] Fixed QuoteString middle name initials --- docs/notework.txt | 2 ++ golded3/getpls.cpp | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/notework.txt b/docs/notework.txt index 60c945c..5eff517 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -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. diff --git a/golded3/getpls.cpp b/golded3/getpls.cpp index 58a4340..e323284 100644 --- a/golded3/getpls.cpp +++ b/golded3/getpls.cpp @@ -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