mirror of
https://github.com/PepperDash/PepperDashCore.git
synced 2026-04-12 03:57:08 +00:00
Try and fix null ref exception for XSigSerialToken
This commit is contained in:
parent
4242fe5635
commit
145682efc4
1 changed files with 2 additions and 1 deletions
|
|
@ -29,7 +29,8 @@ namespace PepperDash.Core.Intersystem.Tokens
|
|||
|
||||
public override byte[] GetBytes()
|
||||
{
|
||||
var serialBytes = Encoding.GetEncoding(28591).GetBytes(Value);
|
||||
var serialBytes = String.IsNullOrEmpty(Value) ? new byte[0] : Encoding.GetEncoding(28591).GetBytes(Value);
|
||||
|
||||
var xsig = new byte[serialBytes.Length + 3];
|
||||
xsig[0] = (byte)(0xC8 | (Index >> 7));
|
||||
xsig[1] = (byte)((Index - 1) & 0x7F);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue