Skip to content

Commit

Permalink
DFLog: Fix messages show as System.byte[]
Browse files Browse the repository at this point in the history
Commit #bb7d061 (BinaryLog: fix raw data extraction aka FILE)  broke messages display, it fixes it and keeps changes in the commit mentioned above.
  • Loading branch information
EosBandi authored and meee1 committed Oct 15, 2023
1 parent bb7d061 commit 80c91b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ExtLibs/Utilities/DFLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ public string[] items
if (a.IsNumber())
return (((IConvertible)a).ToString(CultureInfo.InvariantCulture));
else
return a?.ToString();
if (a is System.Byte[]) return (System.Text.Encoding.ASCII.GetString(a as byte[]).Trim('\0'));
else return a?.ToString();
}).ToArray();
}
return _items;
Expand Down Expand Up @@ -751,4 +752,4 @@ public long GetLineNoFromTime(DFLogBuffer logdata, DateTime p1)
return 0;
}
}
}
}

0 comments on commit 80c91b2

Please sign in to comment.