From 4a8c0c75ffd40d08837d6937e1e995c68ceb276e Mon Sep 17 00:00:00 2001 From: Michael Stroucken Date: Fri, 21 Jul 2017 19:33:55 -0400 Subject: venti: fix venti graph on 64-bit A pixel is 32 bits wide in RGBA, regardless of system's word size. Change-Id: Iea36a8dafdec9ce8d593f944ef5ed1ea08e11d25 Reviewed-on: https://plan9port-review.googlesource.com/2980 Reviewed-by: David du Colombier <0intro@gmail.com> --- CONTRIBUTORS | 1 + src/cmd/venti/srv/png.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 0b9a5415..871c7574 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -35,6 +35,7 @@ Marius Eriksen Martin Neubauer Mathieu Lonjaret Mathieu Lonjaret +Michael Stroucken Michael Teichgräber Michael Teichgräber Nathaniel W Filardo diff --git a/src/cmd/venti/srv/png.c b/src/cmd/venti/srv/png.c index ca456415..8805ada4 100644 --- a/src/cmd/venti/srv/png.c +++ b/src/cmd/venti/srv/png.c @@ -212,7 +212,7 @@ writepng(Hio *io, Memimage *m) /* image data */ zr.dx = Dx(m->r); zr.dy = Dy(m->r); - zr.width = rgb->width * sizeof(ulong); + zr.width = rgb->width * sizeof(u32int); zr.data = rgb->data->bdata; zr.x = 0; zr.y = 0; -- cgit v1.2.3