We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8431925 commit e10890dCopy full SHA for e10890d
2 files changed
go.mod
@@ -5,7 +5,7 @@ go 1.15
5
require (
6
github.com/golang/protobuf v1.5.2 // indirect
7
github.com/pganalyze/pg_query_go/v2 v2.1.2
8
- github.com/rueian/pgbroker v0.0.17
+ github.com/rueian/pgbroker v0.0.18
9
google.golang.org/protobuf v1.33.0 // indirect
10
gopkg.in/yaml.v2 v2.4.0
11
)
pgbroker/message/util.go
@@ -49,7 +49,7 @@ func (b *Message) ReadUint32() (r uint32) {
49
func (b *Message) ReadString() (r string) {
50
end := b.offset
51
max := uint32(len(b.data))
52
- for ; b.data[end] != 0 && end != max; end++ {
+ for ; end != max && b.data[end] != 0; end++ {
53
}
54
r = string(b.data[b.offset:end])
55
b.offset = end + 1
0 commit comments