X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FPathFailure.cs;h=598915210e87c71498b2b3b3636763ad04ce729f;hb=8de7213fbf663ff60322896282dad51e8ab2f001;hp=c4c30685d06ae269f4958914b2275d6e5fcced1a;hpb=afc50e5d491a11364849383b75a8f939df703bac;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/PathFailure.cs b/c_sharp/src/org/ldk/structs/PathFailure.cs index c4c30685..59891521 100644 --- a/c_sharp/src/org/ldk/structs/PathFailure.cs +++ b/c_sharp/src/org/ldk/structs/PathFailure.cs @@ -121,9 +121,11 @@ public class PathFailure : CommonBase { * Serialize the PathFailure object into a byte array which can be read by PathFailure_read */ public byte[] write() { - byte[] ret = bindings.PathFailure_write(this.ptr); + long ret = bindings.PathFailure_write(this.ptr); GC.KeepAlive(this); - return ret; + if (ret >= 0 && ret <= 4096) { return null; } + byte[] ret_conv = InternalUtils.decodeUint8Array(ret); + return ret_conv; } }