summaryrefslogtreecommitdiff
path: root/serialize.go
diff options
context:
space:
mode:
authorHimbeer <himbeer@disroot.org>2025-01-24 16:12:07 +0100
committerHimbeer <himbeer@disroot.org>2025-01-24 16:16:07 +0100
commitb2c1ec5b4f2afecf43ccb59a68684e68b8706431 (patch)
tree56a52eb568807faca153ff5021b5d28e8d567c1f /serialize.go
parent7b8575f6d8b9829f55187efdc135ee704bc69342 (diff)
Fix ToCltMediaPush.ShouldCache position and logic inversion
Revert "Add README with compiler downgrade note" This reverts commit df181fce5c1548f1db6ce5d7e74274fe638a767c.
Diffstat (limited to 'serialize.go')
-rw-r--r--serialize.go56
1 files changed, 28 insertions, 28 deletions
diff --git a/serialize.go b/serialize.go
index 40677d6..66d7bcf 100644
--- a/serialize.go
+++ b/serialize.go
@@ -2617,8 +2617,8 @@ func (obj *ToCltMediaPush) serialize(w io.Writer) {
//mt:const uint16(sha1.Size)
SHA1 [sha1.Size]byte
Filename string
+ Ephemeral bool
CallbackToken uint32
- ShouldCache bool
}))(obj)).SHA1)[:])
chk(err)
}
@@ -2626,8 +2626,8 @@ func (obj *ToCltMediaPush) serialize(w io.Writer) {
//mt:const uint16(sha1.Size)
SHA1 [sha1.Size]byte
Filename string
+ Ephemeral bool
CallbackToken uint32
- ShouldCache bool
}))(obj)).Filename))) > math.MaxUint16 {
chk(ErrTooLong)
}
@@ -2636,8 +2636,8 @@ func (obj *ToCltMediaPush) serialize(w io.Writer) {
//mt:const uint16(sha1.Size)
SHA1 [sha1.Size]byte
Filename string
+ Ephemeral bool
CallbackToken uint32
- ShouldCache bool
}))(obj)).Filename))))
write16(w, uint16(x))
}
@@ -2646,8 +2646,8 @@ func (obj *ToCltMediaPush) serialize(w io.Writer) {
//mt:const uint16(sha1.Size)
SHA1 [sha1.Size]byte
Filename string
+ Ephemeral bool
CallbackToken uint32
- ShouldCache bool
}))(obj)).Filename))[:])
chk(err)
}
@@ -2656,24 +2656,24 @@ func (obj *ToCltMediaPush) serialize(w io.Writer) {
//mt:const uint16(sha1.Size)
SHA1 [sha1.Size]byte
Filename string
+ Ephemeral bool
CallbackToken uint32
- ShouldCache bool
- }))(obj)).CallbackToken
- write32(w, uint32(x))
+ }))(obj)).Ephemeral
+ if x {
+ write8(w, 1)
+ } else {
+ write8(w, 0)
+ }
}
{
x := (*(*(struct {
//mt:const uint16(sha1.Size)
SHA1 [sha1.Size]byte
Filename string
+ Ephemeral bool
CallbackToken uint32
- ShouldCache bool
- }))(obj)).ShouldCache
- if x {
- write8(w, 1)
- } else {
- write8(w, 0)
- }
+ }))(obj)).CallbackToken
+ write32(w, uint32(x))
}
}
@@ -2694,8 +2694,8 @@ func (obj *ToCltMediaPush) deserialize(r io.Reader) {
//mt:const uint16(sha1.Size)
SHA1 [sha1.Size]byte
Filename string
+ Ephemeral bool
CallbackToken uint32
- ShouldCache bool
}))(obj)).SHA1)[:])
chk(err)
}
@@ -2714,27 +2714,17 @@ func (obj *ToCltMediaPush) deserialize(r io.Reader) {
//mt:const uint16(sha1.Size)
SHA1 [sha1.Size]byte
Filename string
+ Ephemeral bool
CallbackToken uint32
- ShouldCache bool
}))(obj)).Filename) = string(local79)
{
p := &(*(*(struct {
//mt:const uint16(sha1.Size)
SHA1 [sha1.Size]byte
Filename string
+ Ephemeral bool
CallbackToken uint32
- ShouldCache bool
- }))(obj)).CallbackToken
- *p = read32(r)
- }
- {
- p := &(*(*(struct {
- //mt:const uint16(sha1.Size)
- SHA1 [sha1.Size]byte
- Filename string
- CallbackToken uint32
- ShouldCache bool
- }))(obj)).ShouldCache
+ }))(obj)).Ephemeral
switch n := read8(r); n {
case 0:
*p = false
@@ -2744,6 +2734,16 @@ func (obj *ToCltMediaPush) deserialize(r io.Reader) {
chk(fmt.Errorf("invalid bool: %d", n))
}
}
+ {
+ p := &(*(*(struct {
+ //mt:const uint16(sha1.Size)
+ SHA1 [sha1.Size]byte
+ Filename string
+ Ephemeral bool
+ CallbackToken uint32
+ }))(obj)).CallbackToken
+ *p = read32(r)
+ }
}
func (obj *ToCltChatMsg) serialize(w io.Writer) {