1
0
Fork 0
mirror of https://github.com/Luzifer/streamdeck.git synced 2024-12-20 09:41:19 +00:00

Fix: Images matching buffer length were never closed

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-08-09 15:28:32 +02:00
parent 9065b0ad0f
commit 4c86bf4811
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 2 additions and 2 deletions

View file

@ -81,7 +81,7 @@ func (d *deckConfigOriginalV2) FillImage(keyIdx int, img image.Image) error {
} }
var last uint8 var last uint8
if n < deckOriginalV2MaxPacketSize-deckOriginalV2HeaderSize { if n < deckOriginalV2MaxPacketSize-deckOriginalV2HeaderSize || buf.Len() == 0 {
last = 1 last = 1
} }

View file

@ -81,7 +81,7 @@ func (d *deckConfigXL) FillImage(keyIdx int, img image.Image) error {
} }
var last uint8 var last uint8
if n < deckXLMaxPacketSize-deckXLHeaderSize { if n < deckXLMaxPacketSize-deckXLHeaderSize || buf.Len() == 0 {
last = 1 last = 1
} }