From c27c2d72da9d6d0123725bbf5a47293af35a398f Mon Sep 17 00:00:00 2001 From: Bjoern Kerler Date: Fri, 27 Aug 2021 23:03:46 +0200 Subject: [PATCH] Fix program buffer function --- edl/Library/firehose.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/edl/Library/firehose.py b/edl/Library/firehose.py index f7e99a0..c634df6 100755 --- a/edl/Library/firehose.py +++ b/edl/Library/firehose.py @@ -503,16 +503,16 @@ class firehose(metaclass=LogBase): while bytestowrite > 0: wlen = min(bytestowrite, self.cfg.MaxPayloadSizeToTargetInBytes) - wdata = data[pos:pos + wlen] + wrdata = wfdata[pos:pos + wlen] pos += wlen bytestowrite -= wlen if wlen % self.cfg.SECTOR_SIZE_IN_BYTES != 0: filllen = (wlen // self.cfg.SECTOR_SIZE_IN_BYTES * self.cfg.SECTOR_SIZE_IN_BYTES) + \ self.cfg.SECTOR_SIZE_IN_BYTES - wdata += b"\x00" * (filllen - wlen) + wrdata += b"\x00" * (filllen - wlen) - self.cdc.write(wdata) + self.cdc.write(wrdata) self.show_progress("Write", total - bytestowrite, total, display) self.cdc.write(b'')