Skip to content

Commit 8bf535b

Browse files
authored
Merge pull request #6 from CrocHold/crochold
loop correction
2 parents 583e316 + a17e48d commit 8bf535b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

message/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (b *Message) ReadUint32() (r uint32) {
4949
func (b *Message) ReadString() (r string) {
5050
end := b.offset
5151
max := uint32(len(b.data))
52-
for ; b.data[end] != 0 && end != max; end++ {
52+
for ; end != max && b.data[end] != 0; end++ {
5353
}
5454
r = string(b.data[b.offset:end])
5555
b.offset = end + 1

0 commit comments

Comments
 (0)