~eliasnaur/gio-patches

gio: io/router: fix invalid conversion in opDecodeFloat32 v1 PROPOSED

~pierrec
~pierrec: 1
 io/router: fix invalid conversion in opDecodeFloat32

 1 files changed, 1 insertions(+), 1 deletions(-)
#437907 apple.yml success
#437908 freebsd.yml success
#437909 linux.yml success
#437910 openbsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~eliasnaur/gio-patches/patches/20500/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH gio] io/router: fix invalid conversion in opDecodeFloat32 Export this patch

~pierrec
From: pierre <pierre.curto@gmail.com>

Without this, area hits are not valid and results in pointer clicks being ignored.

Signed-off-by: pierre <pierre.curto@gmail.com>
---
 io/router/pointer.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io/router/pointer.go b/io/router/pointer.go
index 8680ebd..18d1d92 100644
--- a/io/router/pointer.go
+++ b/io/router/pointer.go
@@ -409,7 +409,7 @@ func searchTag(tags []event.Tag, tag event.Tag) (int, bool) {
}

func opDecodeFloat32(d []byte) float32 {
	return float32(binary.LittleEndian.Uint32(d))
	return float32(int32(binary.LittleEndian.Uint32(d)))
}

func (op *areaOp) Decode(d []byte) {
-- 
2.30.1
builds.sr.ht
gio/patches: SUCCESS in 21m25s

[io/router: fix invalid conversion in opDecodeFloat32][0] from [~pierrec][1]

[0]: https://lists.sr.ht/~eliasnaur/gio-patches/patches/20500
[1]: mailto:pierre.curto@gmail.com

✓ #437908 SUCCESS gio/patches/freebsd.yml https://builds.sr.ht/~eliasnaur/job/437908
✓ #437907 SUCCESS gio/patches/apple.yml   https://builds.sr.ht/~eliasnaur/job/437907
✓ #437910 SUCCESS gio/patches/openbsd.yml https://builds.sr.ht/~eliasnaur/job/437910
✓ #437909 SUCCESS gio/patches/linux.yml   https://builds.sr.ht/~eliasnaur/job/437909
Thanks. I merged Egon's https://github.com/gioui/gio/pull/17 because it
included a test.

Elias