- long ret = bindings.RouteHop_new(pubkey_arg, node_features_arg == null ? 0 : node_features_arg.ptr & ~1, short_channel_id_arg, channel_features_arg == null ? 0 : channel_features_arg.ptr & ~1, fee_msat_arg, cltv_expiry_delta_arg);
- if (ret < 1024) { return null; }
- RouteHop ret_hu_conv = new RouteHop(null, ret);
+ long ret = bindings.RouteHop_new(InternalUtils.check_arr_len(pubkey_arg, 33), node_features_arg == null ? 0 : node_features_arg.ptr & ~1, short_channel_id_arg, channel_features_arg == null ? 0 : channel_features_arg.ptr & ~1, fee_msat_arg, cltv_expiry_delta_arg);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ RouteHop ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new RouteHop(null, ret); }