[gs-cvs] rev 7069 - trunk/gs/src
alexcher at ghostscript.com
alexcher at ghostscript.com
Sun Sep 24 16:50:46 PDT 2006
Author: alexcher
Date: 2006-09-24 16:50:46 -0700 (Sun, 24 Sep 2006)
New Revision: 7069
Modified:
trunk/gs/src/gdevpdtb.c
Log:
Fix calculation of the PDF font subset prefix. This change has little effect,
except enabling previously unreachable code and generating different prefixes
in some cases.
DIFFERENCES:
None
Modified: trunk/gs/src/gdevpdtb.c
===================================================================
--- trunk/gs/src/gdevpdtb.c 2006-09-24 13:22:31 UTC (rev 7068)
+++ trunk/gs/src/gdevpdtb.c 2006-09-24 23:50:46 UTC (rev 7069)
@@ -80,7 +80,6 @@
"pdf_add_subset_prefix");
int len = (count + 7) / 8;
ulong v = 0;
- ushort t = 0;
int i;
if (data == 0)
@@ -88,10 +87,11 @@
/* Hash the 'used' array. */
for (i = 0; i < len; i += sizeof(ushort))
v = hash(v, i, *(ushort *)(used + i));
- if (i < len) {
+ if (i > len) {
+ ushort t = 0;
i -= sizeof(ushort);
memmove(&t, used + i, len - i);
- v = hash(v, i, *(ushort *)(used + i));
+ v = hash(v, i, t);
}
memmove(data + SUBSET_PREFIX_SIZE, data, size);
for (i = 0; i < SUBSET_PREFIX_SIZE - 1; ++i, v /= 26)
More information about the gs-cvs
mailing list