B2026-028_Selecting_to_Go_To_on_an_RO_causes_PROMS_to_crash #730
@@ -372,13 +372,14 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
// B2022-088: [JPR] Find Doc Ro button not working in Word Sections
|
// B2022-088: [JPR] Find Doc Ro button not working in Word Sections
|
||||||
// B2022-098: [JPR] ROs not being resolved in Word Sections
|
// B2022-098: [JPR] ROs not being resolved in Word Sections
|
||||||
if (e.Node.Tag is ROFSTLookup.rochild){
|
if (e.Node.Tag is ROFSTLookup.rochild)
|
||||||
|
{
|
||||||
ROFSTLookup.rochild chld = (ROFSTLookup.rochild)e.Node.Tag;
|
ROFSTLookup.rochild chld = (ROFSTLookup.rochild)e.Node.Tag;
|
||||||
chld.value = Regex.Replace(chld.value, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString());
|
|
||||||
selectedChld = chld;
|
selectedChld = chld;
|
||||||
|
|
||||||
if (chld.value != null)
|
if (chld.value != null)
|
||||||
{
|
{
|
||||||
|
chld.value = Regex.Replace(chld.value, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : "");
|
||||||
|
mschill marked this conversation as resolved
Outdated
|
|||||||
RoUsageInfo SavROLink = null;
|
RoUsageInfo SavROLink = null;
|
||||||
if (_savCurROLink != null) SavROLink = _savCurROLink;
|
if (_savCurROLink != null) SavROLink = _savCurROLink;
|
||||||
|
|
||||||
@@ -1173,3 +1174,4 @@ namespace Volian.Controls.Library
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user
Could there be an exception here with the int.Parse?
Should this be something like:
chld.value = Regex.Replace(chld.value, @"\u([0-9]{1,4})?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : "");
I agree. It would be safter to do the TryParse as suggested
I can add the tryparse, but since the match is only looking for integers [0-9]{1,4} why would the tryparese be needed?