B2026-028_Selecting_to_Go_To_on_an_RO_causes_PROMS_to_crash #730
@@ -379,8 +379,8 @@ namespace Volian.Controls.Library
|
||||
|
||||
if (chld.value != null)
|
||||
{
|
||||
chld.value = Regex.Replace(chld.value, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString());
|
||||
RoUsageInfo SavROLink = 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;
|
||||
if (_savCurROLink != null) SavROLink = _savCurROLink;
|
||||
|
||||
// Set the Display Text to the AccPageID
|
||||
|
||||
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?