Explicitly returning a zero byte
This commit is contained in:
parent
51da6a5761
commit
677c1d83f5
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ public class Memo implements ByteSerializable {
|
||||||
@Override
|
@Override
|
||||||
public byte[] toBytes() {
|
public byte[] toBytes() {
|
||||||
if ((this.from == null) || (this.to == null) || (this.nonce == null) ||(this.message == null)){
|
if ((this.from == null) || (this.to == null) || (this.nonce == null) ||(this.message == null)){
|
||||||
return new byte[1];
|
return new byte[] { (byte) 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] result = new byte[this.from.length+this.to.length+this.nonce.length+this.message.length];
|
byte[] result = new byte[this.from.length+this.to.length+this.nonce.length+this.message.length];
|
||||||
|
|
Loading…
Reference in a new issue