mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 19:17:38 +08:00
fix: WriteIntLvPacket length error (#226)
This commit is contained in:
parent
3e84f279c1
commit
cf864799cb
@ -100,9 +100,9 @@ func (w *Writer) EncryptAndWrite(key []byte, data []byte) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (w *Writer) WriteIntLvPacket(offset int, f func(*Writer)) {
|
func (w *Writer) WriteIntLvPacket(offset int, f func(*Writer)) {
|
||||||
w.FillUInt32()
|
pos := w.FillUInt32()
|
||||||
f(w)
|
f(w)
|
||||||
w.WriteUInt32At(0, uint32(w.Len()-4+offset))
|
w.WriteUInt32At(pos, uint32(w.Len()+offset-pos-4))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *Writer) WriteBytesShort(data []byte) {
|
func (w *Writer) WriteBytesShort(data []byte) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user