Skip to content

Commit 5797d0c

Browse files
fix missing text (#237)
1 parent f8b6718 commit 5797d0c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

MAPIInspector/Source/Parsers/BaseStructure.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ public static TreeNode AddBlock(Block block, bool debug)
5252
private static TreeNode AddBlock(Block block, int blockRootOffset, bool debug)
5353
{
5454
// Clean up embedded null characters in the block text for display purposes
55-
var text = block.Text.Replace("\0", "\\0");
55+
var text = block.Text?.Replace("\0", "\\0");
56+
if (text == null)
57+
{
58+
text = $"Exception: Missing Text property for {block.GetType()}";
59+
}
5660
const int maxNodeLength = 100;
5761
// Truncate the text if it exceeds 100 characters for display purposes
5862
if (text.Length > maxNodeLength)

MAPIInspector/Source/Parsers/MSOXCDATA/2.11 Property Values/PtypServerIdStruct.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ protected override void Parse()
5252

5353
protected override void ParseBlocks()
5454
{
55+
Text = "PtypServerId";
5556
AddChildBlockT(Ours, "Ours");
5657
AddLabeledChild(FolderID, "FolderID");
5758
AddLabeledChild(MessageID, "MessageID");

0 commit comments

Comments
 (0)