[PATCH gio] io/router: fix invalid conversion in opDecodeFloat32
Export this patch
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
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