X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FAcceptChannel.java;h=09125fe31b528e7520fcaf7b0d758a1576b6f000;hb=c6bac88847b7c09560af81f00ba8dd3c2ebe3a19;hp=e4286b2300db702cbdce25820ca1dfb0af4114a2;hpb=db1a11032b4164540a2d3403696be12bbca70e94;p=ldk-java diff --git a/src/main/java/org/ldk/structs/AcceptChannel.java b/src/main/java/org/ldk/structs/AcceptChannel.java index e4286b23..09125fe3 100644 --- a/src/main/java/org/ldk/structs/AcceptChannel.java +++ b/src/main/java/org/ldk/structs/AcceptChannel.java @@ -234,8 +234,8 @@ public class AcceptChannel extends CommonBase { */ public AcceptChannel clone() { long ret = bindings.AcceptChannel_clone(this.ptr); - if (ret < 1024) { return null; } - AcceptChannel ret_hu_conv = new AcceptChannel(null, ret); + if (ret >= 0 && ret <= 4096) { return null; } + AcceptChannel ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new AcceptChannel(null, ret); } ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -253,7 +253,7 @@ public class AcceptChannel extends CommonBase { */ public static Result_AcceptChannelDecodeErrorZ read(byte[] ser) { long ret = bindings.AcceptChannel_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret <= 4096) { return null; } Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }