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:
parent
9065b0ad0f
commit
4c86bf4811
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue