ref: 2fe2ffe8135f0dc76644d650a399bd877b3ee7f7
parent: cf74c80e7b38a6ae521da16d4bdf84783ef320e7
author: cinap_lenrek <[email protected]>
date: Sun Aug 16 14:20:22 EDT 2015
gs: fix alignment bug in image_render_interpolate()
--- a/sys/src/cmd/gs/src/gxiscale.c
+++ b/sys/src/cmd/gs/src/gxiscale.c
@@ -182,6 +182,7 @@
stream_cursor_write w;
byte *out = penum->line;
+
if (h != 0) {
/* Convert the unpacked data to concrete values in */
/* the source buffer. */
@@ -203,7 +204,7 @@
for (i = 0; i < pss->params.WidthIn; p -= c, q += c, ++i)
memcpy(q, p, c);
r.ptr = out - 1;
- out = q;
+ out += round_up(pss->params.WidthIn * c, align_bitmap_mod);
}
} else {
/* Messy case: concretize each sample. */