commit | 33cdf63251a23d71906cb482bce4ca02ce6d94c0 | [log] [tgz] |
---|---|---|
author | Erik Quanstrom <quanstro@quanstro.net> | Sun Oct 21 12:08:49 2012 -0400 |
committer | Russ Cox <rsc@swtch.com> | Sun Oct 21 12:08:49 2012 -0400 |
tree | 6a169670a84500665ef5ad80ba5c5f287286dba8 | |
parent | c5bfba483f4002c539cbeb4087827524dba8d0f8 [diff] |
libmemdraw: fix int size bug R=rsc, quanstro CC=plan9port.codebot http://codereview.appspot.com/6657043
diff --git a/src/libmemdraw/alloc.c b/src/libmemdraw/alloc.c index b6ad61a..fa23b5e 100644 --- a/src/libmemdraw/alloc.c +++ b/src/libmemdraw/alloc.c
@@ -141,7 +141,8 @@ { 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){ /*