diff --git a/buffer.py b/buffer.py index fd2a640..c9e4e6f 100644 --- a/buffer.py +++ b/buffer.py @@ -527,7 +527,7 @@ class Binary32Buffer(FileBuffer): FileBuffer.__init__(self, path, nl, name) def cursorx_to_datax(self, cy, cx): bytespace = 2 + self.bytepad - groupspace = bytespace * self.groupsize - 1 + self.grouppad + groupspace = bytespace * self.groupsize - self.bytepad + self.grouppad groupmod = (cx + self.grouppad) % groupspace if groupmod < self.grouppad: @@ -542,7 +542,7 @@ class Binary32Buffer(FileBuffer): return None bytediv = ((cx + self.bytepad) % groupspace) // bytespace - ix = self.groupsize * groupdiv + bytediv + ix = self.groupsize * groupdiv + bytediv if ix < len(self.rawdata[cy]): return ix else: