[gs-cvs] rev 8198 - trunk/gs/src
alexcher at ghostscript.com
alexcher at ghostscript.com
Mon Aug 20 10:15:22 PDT 2007
Author: alexcher
Date: 2007-08-20 10:15:22 -0700 (Mon, 20 Aug 2007)
New Revision: 8198
Modified:
trunk/gs/src/gxclrast.c
Log:
Fix command list-based devices on 64-bit platforms. Ghostscript always writes
int values to the command list but old code interpreted the bit pattern as a
long int, causing conversion of the negative values to large positive ones.
Bug 689353.
DIFFERENCES:
None on 32-bit platforms.
Modified: trunk/gs/src/gxclrast.c
===================================================================
--- trunk/gs/src/gxclrast.c 2007-08-20 17:10:51 UTC (rev 8197)
+++ trunk/gs/src/gxclrast.c 2007-08-20 17:15:22 UTC (rev 8198)
@@ -89,10 +89,10 @@
private long
cmd_get_w(const byte * p, const byte ** rp)
{
- long val = *p++ & 0x7f;
+ int val = *p++ & 0x7f;
int shift = 7;
- for (; val |= (long)(*p & 0x7f) << shift, *p++ > 0x7f; shift += 7);
+ for (; val |= (int)(*p & 0x7f) << shift, *p++ > 0x7f; shift += 7);
*rp = p;
return val;
}
More information about the gs-cvs
mailing list