fixes in swfstrings
authorMatthias Kramm <kramm@quiss.org>
Sun, 6 Sep 2009 12:45:09 +0000 (14:45 +0200)
committerMatthias Kramm <kramm@quiss.org>
Sun, 6 Sep 2009 12:45:09 +0000 (14:45 +0200)
lib/modules/swfobject.c
src/swfstrings.c

index ef6903e..36b66d4 100644 (file)
@@ -153,8 +153,10 @@ void swf_SetPlaceObject(TAG * t,SWFPLACEOBJECT* obj)
 
 void swf_GetPlaceObject(TAG * tag,SWFPLACEOBJECT* obj)
 {
 
 void swf_GetPlaceObject(TAG * tag,SWFPLACEOBJECT* obj)
 {
-    if(!tag) {
+    if(obj)
        memset(obj, 0, sizeof(SWFPLACEOBJECT));
        memset(obj, 0, sizeof(SWFPLACEOBJECT));
+
+    if(!tag) {
        swf_GetMatrix(0, &obj->matrix);
        swf_GetCXForm(0, &obj->cxform, 1);
        //obj->internal = PF_CHAR|PF_MATRIX|PF_CXFORM;
        swf_GetMatrix(0, &obj->matrix);
        swf_GetCXForm(0, &obj->cxform, 1);
        //obj->internal = PF_CHAR|PF_MATRIX|PF_CXFORM;
index 1bbd52f..f288276 100644 (file)
@@ -151,7 +151,7 @@ void textcallback(void*self, int*glyphs, int*advance, int nr, int fontid, int fo
 
        unsigned char a; 
        int advance = 0;
 
        unsigned char a; 
        int advance = 0;
-       if(font>=0) {
+       if(font) {
            if(glyphs[t]<0 || glyphs[t] >= font->numchars  /*glyph is not in range*/
                    || !font->glyph2ascii /* font has ascii<->glyph mapping */
              ) a = glyphs[t];
            if(glyphs[t]<0 || glyphs[t] >= font->numchars  /*glyph is not in range*/
                    || !font->glyph2ascii /* font has ascii<->glyph mapping */
              ) a = glyphs[t];