plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 33cdf63251a23d71906cb482bce4ca02ce6d94c0
parent c5bfba483f4002c539cbeb4087827524dba8d0f8
Author: Erik Quanstrom <quanstro@quanstro.net>
Date:   Sun, 21 Oct 2012 12:08:49 -0400

libmemdraw: fix int size bug

R=rsc, quanstro
CC=plan9port.codebot
http://codereview.appspot.com/6657043

Diffstat:
Msrc/libmemdraw/alloc.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/libmemdraw/alloc.c b/src/libmemdraw/alloc.c @@ -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){ /*