libmemdraw: fix int size bug

R=rsc, quanstro
CC=plan9port.codebot
http://codereview.appspot.com/6657043
This commit is contained in:
Erik Quanstrom 2012-10-21 12:08:49 -04:00 committed by Russ Cox
parent c5bfba483f
commit 33cdf63251

View file

@ -141,7 +141,8 @@ byteaddr(Memimage *i, Point p)
{
uchar *a;
a = i->data->bdata+i->zero+sizeof(u32int)*p.y*i->width;
/* careful to sign-extend negative p.y for 64-bits */
a = i->data->bdata+i->zero+(int)(sizeof(u32int)*p.y*i->width);
if(i->depth < 8){
/*