From 05fac5384fd49f1eed037076549c9e5246181a1a Mon Sep 17 00:00:00 2001 From: David Vennik Date: Tue, 13 Dec 2022 09:50:11 +0100 Subject: [PATCH] Fixed Packet encoder error --- pkg/packet/packet.go | 4 ++-- version.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/packet/packet.go b/pkg/packet/packet.go index e4603b8d..eb3812a2 100644 --- a/pkg/packet/packet.go +++ b/pkg/packet/packet.go @@ -198,8 +198,8 @@ func Decode(d []byte, from *pub.Key, to *prv.Key) (f *Packet, e error) { // security. data := d[KeyEnd:] ciph.Encipher(blk, nonc, data) - var seq slice.Size16 - var length slice.Size32 + seq := slice.NewUint16() + length := slice.NewUint32() seq, data = slice.Cut(data, slice.Uint16Len) f.Seq = uint16(slice.DecodeUint16(seq)) length, data = slice.Cut(data, slice.Uint32Len) diff --git a/version.go b/version.go index cd88247a..cfb30925 100644 --- a/version.go +++ b/version.go @@ -13,11 +13,11 @@ var ( // GitRef is the gitref, as in refs/heads/branchname. GitRef = "refs/heads/main" // ParentGitCommit is the commit hash of the parent HEAD. - ParentGitCommit = "e9bb22630f78c0706079c2f8761ca9a2630bc3e2" + ParentGitCommit = "2a0841e08486dd98922d593ee774d19f5a79514f" // BuildTime stores the time when the current binary was built. - BuildTime = "2022-12-13T09:47:08+01:00" + BuildTime = "2022-12-13T09:50:11+01:00" // SemVer lists the (latest) git tag on the build. - SemVer = "v0.0.184" + SemVer = "v0.0.185" // PathBase is the path base returned from runtime caller. PathBase = "/home/loki/src/github.com/Indra-Labs/indra/" // Major is the major number from the tag. @@ -25,7 +25,7 @@ var ( // Minor is the minor number from the tag. Minor = 0 // Patch is the patch version number from the tag. - Patch = 184 + Patch = 185 ) // Version returns a pretty printed version information string.