summaryrefslogtreecommitdiff
path: root/vendor/github.com/ugorji/go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-06-01 22:20:16 +0100
committerLibravatar GitHub <noreply@github.com>2023-06-01 22:20:16 +0100
commit55aacaf4b07c1921061245cbaa3d307e97cf3c29 (patch)
treed969c5d9728566de1e794e19c5b19d3b660f790e /vendor/github.com/ugorji/go
parent[chore/frontend] refactor header templating, add apple-touch-icon (#1850) (diff)
downloadgotosocial-55aacaf4b07c1921061245cbaa3d307e97cf3c29.tar.xz
[chore]: Bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#1855)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/ugorji/go')
-rw-r--r--vendor/github.com/ugorji/go/codec/README.md2
-rw-r--r--vendor/github.com/ugorji/go/codec/decode.go2
-rw-r--r--vendor/github.com/ugorji/go/codec/encode.go1
-rw-r--r--vendor/github.com/ugorji/go/codec/gen-helper.generated.go2
-rw-r--r--vendor/github.com/ugorji/go/codec/gen.go10
5 files changed, 10 insertions, 7 deletions
diff --git a/vendor/github.com/ugorji/go/codec/README.md b/vendor/github.com/ugorji/go/codec/README.md
index e4c45bc83..b8c1829bb 100644
--- a/vendor/github.com/ugorji/go/codec/README.md
+++ b/vendor/github.com/ugorji/go/codec/README.md
@@ -247,7 +247,7 @@ caveats. See Encode documentation.
```go
const CborStreamBytes byte = 0x5f ...
-const GenVersion = 26
+const GenVersion = 28
var SelfExt = &extFailWrapper{}
var GoRpc goRpc
var MsgpackSpecRpc msgpackSpecRpc
diff --git a/vendor/github.com/ugorji/go/codec/decode.go b/vendor/github.com/ugorji/go/codec/decode.go
index db87f2e71..d549188de 100644
--- a/vendor/github.com/ugorji/go/codec/decode.go
+++ b/vendor/github.com/ugorji/go/codec/decode.go
@@ -734,7 +734,7 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) {
// iterate all the items in the stream
// if mapped elem-wise to a field, handle it
- // if more stream items than cap be mapped, error it
+ // if more stream items than can be mapped, error it
for j := 0; d.containerNext(j, containerLen, hasLen); j++ {
d.arrayElem()
if j < len(tisfi) {
diff --git a/vendor/github.com/ugorji/go/codec/encode.go b/vendor/github.com/ugorji/go/codec/encode.go
index 53389b085..70361b5cc 100644
--- a/vendor/github.com/ugorji/go/codec/encode.go
+++ b/vendor/github.com/ugorji/go/codec/encode.go
@@ -893,6 +893,7 @@ func (e *Encoder) kMapCanonical(ti *typeInfo, rv, rvv reflect.Value, keyFn, valF
v := &mksbv[i]
l := len(mksv)
+ e.c = containerMapKey
e.encodeValue(k, nil)
e.atEndOfEncode()
e.w().end()
diff --git a/vendor/github.com/ugorji/go/codec/gen-helper.generated.go b/vendor/github.com/ugorji/go/codec/gen-helper.generated.go
index 676203daf..9a145f140 100644
--- a/vendor/github.com/ugorji/go/codec/gen-helper.generated.go
+++ b/vendor/github.com/ugorji/go/codec/gen-helper.generated.go
@@ -13,7 +13,7 @@ import (
)
// GenVersion is the current version of codecgen.
-const GenVersion = 26
+const GenVersion = 28
// This file is used to generate helper code for codecgen.
// The values here i.e. genHelper(En|De)coder are not to be used directly by
diff --git a/vendor/github.com/ugorji/go/codec/gen.go b/vendor/github.com/ugorji/go/codec/gen.go
index d0cec1972..de7ee72f1 100644
--- a/vendor/github.com/ugorji/go/codec/gen.go
+++ b/vendor/github.com/ugorji/go/codec/gen.go
@@ -151,7 +151,9 @@ import (
// v24: 20210226 robust handling for Canonical|CheckCircularRef flags and MissingFielder implementations
// v25: 20210406 pass base reflect.Type to side(En|De)code and (En|De)codeExt calls
// v26: 20230201 genHelper changes for more inlining and consequent performance
-const genVersion = 26
+// v27: 20230219 fix error decoding struct from array - due to misplaced counter increment
+// v28: 20230224 fix decoding missing fields of struct from array, due to double counter increment
+const genVersion = 28
const (
genCodecPkg = "codec1978" // MARKER: keep in sync with codecgen/gen.go
@@ -2090,7 +2092,6 @@ func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid
x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length
var newbuf, nilbuf genBuf
for _, si := range tisfi {
- x.linef("%sj%s++", tpfx, i)
x.linef("%sb%s = !z.DecContainerNext(%sj%s, %s, %shl%s)", tpfx, i, tpfx, i, lenvarname, tpfx, i)
x.linef("if %sb%s { z.DecReadArrayEnd(); %s }", tpfx, i, breakString)
x.line("z.DecReadArrayElem()")
@@ -2104,10 +2105,11 @@ func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid
if len(newbuf.buf) > 0 {
x.line("}")
}
+ x.linef("%sj%s++", tpfx, i)
}
// read remaining values and throw away.
- x.linef("for %sj%s++; z.DecContainerNext(%sj%s, %s, %shl%s); %sj%s++ {",
- tpfx, i, tpfx, i, lenvarname, tpfx, i, tpfx, i)
+ x.linef("for ; z.DecContainerNext(%sj%s, %s, %shl%s); %sj%s++ {",
+ tpfx, i, lenvarname, tpfx, i, tpfx, i)
x.line("z.DecReadArrayElem()")
x.linef(`z.DecStructFieldNotFound(%sj%s - 1, "")`, tpfx, i)
x.line("}")