Explicitly returning a zero byte

master
Nelson R. Perez 2016-12-05 20:45:58 -05:00
parent 51da6a5761
commit 677c1d83f5
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ public class Memo implements ByteSerializable {
@Override
public byte[] toBytes() {
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];