[stsf-commit] stsf/STClientLibrary/src serverconnection.c,1.4,1.5

Alexander Gelfenbain stsf-commit at pdx.freedesktop.org
Tue May 25 14:34:51 PDT 2004


Committed by: adg


Index: serverconnection.c
===================================================================
RCS file: /cvs/stsf/stsf/STClientLibrary/src/serverconnection.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/serverconnection.c	25 May 2004 21:08:21 -0000	1.4
+++ b/serverconnection.c	25 May 2004 21:34:49 -0000	1.5
@@ -952,7 +952,7 @@
 
     if ((p = SharedCacheFind(cache, *scalerID, instanceID, glyphID, fracdelta, &nbytes)) != NULL) {
         /* p points to s->psize bytes of payload follows by ScaledGlyphData followed by the glyph bitmap */
-        memcpy(metrics, p+s->psize, sizeof(ScaledGlyphData));
+        memcpy(metrics, p, sizeof(ScaledGlyphData));
         *buffersize = nbytes - sizeof(ScaledGlyphData) - s->psize;
         *buffer = p + sizeof(ScaledGlyphData) + s->psize;
         return ST_OK;
@@ -971,7 +971,7 @@
         *scalerID = e->scalerID;
 
         p = SharedCacheGetEntry(cache, e, &nbytes);
-        memcpy(metrics, p+s->psize, sizeof(ScaledGlyphData));
+        memcpy(metrics, p, sizeof(ScaledGlyphData));
         *buffersize = nbytes - sizeof(ScaledGlyphData) - s->psize;
         *buffer = p + sizeof(ScaledGlyphData) + s->psize;
         return ST_OK;
@@ -1084,9 +1084,9 @@
     for (i=0; i<gcount; i++) {
         if ((p = SharedCacheFind(cache, gk[i].scalerID, gk[i].instanceID, gk[i].glyphID, gk[i].fracdelta, &nbytes)) != NULL) {
             n++;
-            pptr[i] = SCPayloadSize > 0 ? (void *) p : (void *) 1;
+            pptr[i] = SCPayloadSize > 0 ? (void *) p + sizeof(ScaledGlyphData) : (void *) 1;
             gptr[i] = (void *) (p + SCPayloadSize + sizeof(ScaledGlyphData));      /* see stfs.h */
-            sgd = (ScaledGlyphData *) (p + SCPayloadSize);
+            sgd = (ScaledGlyphData *) p;
 
             if (b != NULL) {
                 if (sgd->width > b->width)      b->width = sgd->width;




More information about the stsf-commit mailing list