libmemdraw: fix int size bug
R=rsc, quanstro CC=plan9port.codebot http://codereview.appspot.com/6657043
This commit is contained in:
parent
c5bfba483f
commit
33cdf63251
1 changed files with 2 additions and 1 deletions
|
|
@ -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){
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue