From 804da7a3cacf08c3094b138c1e8c37d2c9f40faf Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 28 May 2015 13:16:43 +0000 Subject: [PATCH] =?UTF-8?q?Fixed=20B2015-072,=20replace=20words=20crashing?= =?UTF-8?q?=20on=20=E2=80=98=20[=E2=80=98=20where=20space=20is=20part=20of?= =?UTF-8?q?=20bold=20rtf=20command.=20Allow=20for=20a=20step=20transition?= =?UTF-8?q?=20to=20go=20to=20another=20procedure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Formats/fmtall/AEPall.xml | Bin 66630 -> 66662 bytes PROMS/Volian.Controls.Library/DisplayText.cs | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PROMS/Formats/fmtall/AEPall.xml b/PROMS/Formats/fmtall/AEPall.xml index 36e6e4b6755eadb5b8f26d7afbdee1c880925484..aaf66094dd721f13adb554463ed10cd11355fdd6 100644 GIT binary patch delta 94 zcmX@s!SbwwWy7hi$qBt7>Lm>M3GAJ;VGh{N9Fk~>~Gn4{p1)yjmLpo4a pfgukllFN_;WEV~T*kU-@p*d_apD)*BwnmZ37wVigTlDBv000kL91{Ql diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index 880d3096..3e2f5b7b 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -1817,7 +1817,7 @@ namespace Volian.Controls.Library // don't use the \W, i.e. don't bother to look for a non-word character. string wordMatchBeg = Regex.IsMatch(replaceWord.Substring(0, 1), @"\W") ? "" : @"(?<=\W|^)"; string wordMatchEnd = Regex.IsMatch(replaceWord.Substring(replaceWord.Length - 1, 1), @"\W") ? "" : @"(?=\W|$)"; - string pat = wordMatchBeg + @"(? -1 && preceedingText[ndxBold + 2] != '0' && with.Contains(@"\b ")) + if (ndxBold > -1 && preceedingText.Length>(ndxBold+2) && preceedingText[ndxBold + 2] != '0' && with.Contains(@"\b ")) { with = with.Replace(@"\b ",""); with = with.Replace(@"\b0 ","");