[C#] Update auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / UnsignedGossipMessage.cs
index 1b6990bd07961e0c3b5fe40ecfb29098ef531148..ff59a12d10a2c0da130002c589c9e673c449e7de 100644 (file)
@@ -116,9 +116,11 @@ public class UnsignedGossipMessage : CommonBase {
         * Serialize the UnsignedGossipMessage object into a byte array which can be read by UnsignedGossipMessage_read
         */
        public byte[] write() {
-               byte[] ret = bindings.UnsignedGossipMessage_write(this.ptr);
+               long ret = bindings.UnsignedGossipMessage_write(this.ptr);
                GC.KeepAlive(this);
-               return ret;
+               if (ret >= 0 && ret <= 4096) { return null; }
+               byte[] ret_conv = InternalUtils.decodeUint8Array(ret);
+               return ret_conv;
        }
 
 }