X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FNodeFeatures.java;h=c41109307d74b2f53d366d9cec3f311833883256;hb=32692e00046b7ec16b6a2e20bd54800b2b48d4c0;hp=75134c928b4fc8f0cbb66cecf2e5bca69130d70c;hpb=bd77123c0c67bbf8dfc2c1326fadca583220dda1;p=ldk-java diff --git a/src/main/java/org/ldk/structs/NodeFeatures.java b/src/main/java/org/ldk/structs/NodeFeatures.java index 75134c92..c4110930 100644 --- a/src/main/java/org/ldk/structs/NodeFeatures.java +++ b/src/main/java/org/ldk/structs/NodeFeatures.java @@ -35,7 +35,7 @@ public class NodeFeatures extends CommonBase { */ public NodeFeatures clone() { long ret = bindings.NodeFeatures_clone(this.ptr); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeFeatures ret_hu_conv = new NodeFeatures(null, ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; @@ -46,7 +46,7 @@ public class NodeFeatures extends CommonBase { */ public static NodeFeatures empty() { long ret = bindings.NodeFeatures_empty(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeFeatures ret_hu_conv = new NodeFeatures(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -57,7 +57,7 @@ public class NodeFeatures extends CommonBase { */ public static NodeFeatures known() { long ret = bindings.NodeFeatures_known(); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } NodeFeatures ret_hu_conv = new NodeFeatures(null, ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; @@ -93,7 +93,7 @@ public class NodeFeatures extends CommonBase { */ public static Result_NodeFeaturesDecodeErrorZ read(byte[] ser) { long ret = bindings.NodeFeatures_read(ser); - if (ret < 1024) { return null; } + if (ret >= 0 && ret < 1024) { return null; } Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }