Explicitly returning a zero byte

This commit is contained in:
Nelson R. Perez 2016-12-05 20:45:58 -05:00
parent 51da6a5761
commit 677c1d83f5

View file

@ -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];