V3 header generation was concat()-ing non-Uint8 arrays
This commit is contained in:
parent
5ffb532f9e
commit
0989015ed2
|
@ -97,9 +97,9 @@ export default {
|
||||||
if (length < 256) {
|
if (length < 256) {
|
||||||
return new Uint8Array([0x80 | (tag_type << 2), length]);
|
return new Uint8Array([0x80 | (tag_type << 2), length]);
|
||||||
} else if (length < 65536) {
|
} else if (length < 65536) {
|
||||||
return util.concatUint8Array([0x80 | (tag_type << 2) | 1, util.writeNumber(length, 2)]);
|
return util.concatUint8Array([new Uint8Array([0x80 | (tag_type << 2) | 1]), util.writeNumber(length, 2)]);
|
||||||
} else {
|
} else {
|
||||||
return util.concatUint8Array([0x80 | (tag_type << 2) | 2, util.writeNumber(length, 4)]);
|
return util.concatUint8Array([new Uint8Array([0x80 | (tag_type << 2) | 2]), util.writeNumber(length, 4)]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user