crop: fix size calculation

R=rsc
http://codereview.appspot.com/429042
This commit is contained in:
Russ Cox 2010-03-11 18:00:53 -08:00
parent 96898a8141
commit 8e4ac5f7fa

View file

@ -56,7 +56,7 @@ crop(Memimage *m, ulong c)
m = n;
}
wpl = wordsperline(m->r, m->depth);
bpl = wpl*sizeof(ulong);
bpl = wpl*sizeof(uint32);
buf = malloc(bpl);
if(buf == nil)
sysfatal("can't allocate buffer: %r");