Fixed subtle shared mutability bug in tracebd.py
In the hack where we wait for multiple updates to fill out a full braille/dots line we store the current pixels in a temporary array. Unfortunately, in some cases, this is the array we modify with updates... A copy fixes this.
This commit is contained in:
+1
-1
@@ -534,7 +534,7 @@ class Bd:
|
||||
needed_height = 4 if braille else 2
|
||||
|
||||
self.history = getattr(self, 'history', [])
|
||||
self.history.append(grid)
|
||||
self.history.append(grid.copy())
|
||||
|
||||
if len(self.history)*self.height < needed_height:
|
||||
# skip for now
|
||||
|
||||
Reference in New Issue
Block a user