--HG--
branch : pmacs2
This commit is contained in:
moculus 2008-04-10 22:22:31 +00:00
parent 9cd9d68b57
commit 4947c95bf4
1 changed files with 2 additions and 2 deletions

View File

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