File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ func (h *Header) Decode(in []byte) error {
152
152
}
153
153
b , in = in [:size ], in [size :]
154
154
h .HeaderSize += int (size )
155
- switch size {
155
+ switch len ( b ) {
156
156
case 1 :
157
157
h .DictionaryID = uint32 (b [0 ])
158
158
case 2 :
@@ -182,7 +182,7 @@ func (h *Header) Decode(in []byte) error {
182
182
}
183
183
b , in = in [:fcsSize ], in [fcsSize :]
184
184
h .HeaderSize += int (fcsSize )
185
- switch fcsSize {
185
+ switch len ( b ) {
186
186
case 1 :
187
187
h .FrameContentSize = uint64 (b [0 ])
188
188
case 2 :
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ func (d *frameDec) reset(br byteBuffer) error {
167
167
return err
168
168
}
169
169
var id uint32
170
- switch size {
170
+ switch len ( b ) {
171
171
case 1 :
172
172
id = uint32 (b [0 ])
173
173
case 2 :
@@ -204,7 +204,7 @@ func (d *frameDec) reset(br byteBuffer) error {
204
204
println ("Reading Frame content" , err )
205
205
return err
206
206
}
207
- switch fcsSize {
207
+ switch len ( b ) {
208
208
case 1 :
209
209
d .FrameContentSize = uint64 (b [0 ])
210
210
case 2 :
You can’t perform that action at this time.
0 commit comments