summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2014-08-14 12:32:32 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2014-08-14 12:32:32 +0000
commit0ed8701c73d609aeb2c3a604c29f57e2f1874327 (patch)
tree20b1883a64e2d328aa478333cdaef9c00793b69f /Build
parentbf39c2f62b38b7f440461c1e5ebb664ff2617a62 (diff)
bug fix (by S. Hirata)
git-svn-id: svn://tug.org/texlive/trunk@34932 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipdfm-x/pdfobj.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfobj.c b/Build/source/texk/dvipdfm-x/pdfobj.c
index cfd4a4e68bd..8f44bd5cd5d 100644
--- a/Build/source/texk/dvipdfm-x/pdfobj.c
+++ b/Build/source/texk/dvipdfm-x/pdfobj.c
@@ -1941,19 +1941,18 @@ filter_decoded (pdf_obj *dst, const void *src, long srclen,
while (p + length < endptr) {
/* Same as PNG Sub */
for (i = 0; i < length; i++) {
- int pv = i - bytes_per_pixel >= 0 ? prev[i - bytes_per_pixel] : 0;
+ int pv = i - bytes_per_pixel >= 0 ? buf[i - bytes_per_pixel] : 0;
buf[i] = (unsigned char)(((int) p[i] + pv) & 0xff);
}
pdf_add_stream(dst, buf, length);
- memcpy(prev, buf, length);
p += length;
}
} else if (parms->bits_per_component == 16) {
while (p + length < endptr) {
for (i = 0; i < length; i += 2) {
int b = i - bytes_per_pixel;
- char hi = b >= 0 ? prev[b] : 0;
- char lo = b >= 0 ? prev[b + 1] : 0;
+ char hi = b >= 0 ? buf[b] : 0;
+ char lo = b >= 0 ? buf[b + 1] : 0;
long pv = (hi << 8) | lo;
long cv = (p[i] << 8) | p[i + 1];
long c = pv + cv;
@@ -1961,7 +1960,6 @@ filter_decoded (pdf_obj *dst, const void *src, long srclen,
buf[i + 1] = (unsigned char) (c & 0xff);
}
pdf_add_stream(dst, buf, length);
- memcpy(prev, buf, length);
p += length;
}
} else { /* bits per component 1, 2, 4 */
@@ -1999,7 +1997,7 @@ filter_decoded (pdf_obj *dst, const void *src, long srclen,
break;
case 1:
for (i = 0; i < length; i++) {
- int pv = i - bytes_per_pixel >= 0 ? prev[i - bytes_per_pixel] : 0;
+ int pv = i - bytes_per_pixel >= 0 ? buf[i - bytes_per_pixel] : 0;
buf[i] = (unsigned char)(((int) p[i] + pv) & 0xff);
}
break;