mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 16:58:09 +02:00
Ensure leftover bytes are a copy
This commit is contained in:
@@ -283,7 +283,7 @@ class WriteRequest:
|
|||||||
extra = len(data) % 4
|
extra = len(data) % 4
|
||||||
if extra > 0:
|
if extra > 0:
|
||||||
mv = memoryview(data)
|
mv = memoryview(data)
|
||||||
self.current_leftover_bytes = mv[-extra:]
|
self.current_leftover_bytes = memoryview(bytes(mv[-extra:]))
|
||||||
mv = mv[:-extra]
|
mv = mv[:-extra]
|
||||||
if len(mv) > 0:
|
if len(mv) > 0:
|
||||||
self.write_base64_data(mv)
|
self.write_base64_data(mv)
|
||||||
|
|||||||
Reference in New Issue
Block a user