diff options
Diffstat (limited to 'Modules/rgbimgmodule.c')
-rw-r--r-- | Modules/rgbimgmodule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/rgbimgmodule.c b/Modules/rgbimgmodule.c index d2428d1..18d2776 100644 --- a/Modules/rgbimgmodule.c +++ b/Modules/rgbimgmodule.c @@ -216,7 +216,7 @@ writetab(outf, tab, len) while(len) { r = putlong(outf, *tab++); - len -= 4; + len--; } return r; } @@ -229,7 +229,7 @@ readtab(inf, tab, len) { while(len) { *tab++ = getlong(inf); - len -= 4; + len--; } } @@ -322,8 +322,8 @@ longimagedata(self, args) } fseek(inf, 512, SEEK_SET); - readtab(inf, starttab, tablen); - readtab(inf, lengthtab, tablen); + readtab(inf, starttab, ysize*zsize); + readtab(inf, lengthtab, ysize*zsize); /* check data order */ cur = 0; @@ -655,8 +655,8 @@ longstoimage(self, args) } fseek(outf, 512, SEEK_SET); - goodwrite *= writetab(outf, starttab, tablen); - goodwrite *= writetab(outf, lengthtab, tablen); + goodwrite *= writetab(outf, starttab, ysize*zsize); + goodwrite *= writetab(outf, lengthtab, ysize*zsize); if (goodwrite) { Py_INCREF(Py_None); retval = Py_None; |