From 046934495929c7553a2982eeaa4168c09cd5deb5 Mon Sep 17 00:00:00 2001
From: Jens Nolte <git@queezle.net>
Date: Wed, 15 Sep 2021 23:51:24 +0200
Subject: [PATCH] Fix off-by-one error when writing a blob

---
 src/Quasar/Wayland/Protocol/Core.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Quasar/Wayland/Protocol/Core.hs b/src/Quasar/Wayland/Protocol/Core.hs
index 5ac5f81..eca993f 100644
--- a/src/Quasar/Wayland/Protocol/Core.hs
+++ b/src/Quasar/Wayland/Protocol/Core.hs
@@ -552,7 +552,7 @@ getWaylandBlob = do
 putWaylandBlob :: BS.ByteString -> Put
 putWaylandBlob blob = do
   let size = BS.length blob
-  putWord32host (fromIntegral size)
+  putWord32host (fromIntegral (size + 1))
   putByteString blob
   putWord8 0
   replicateM_ ((4 - (size `mod` 4)) `mod` 4) (putWord8 0)
-- 
GitLab