From 445a7e494abd92243be4f21028c609beb99e4322 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Sun, 6 Sep 2009 14:45:09 +0200 Subject: [PATCH] fixes in swfstrings --- lib/modules/swfobject.c | 4 +++- src/swfstrings.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/modules/swfobject.c b/lib/modules/swfobject.c index ef6903e..36b66d4 100644 --- a/lib/modules/swfobject.c +++ b/lib/modules/swfobject.c @@ -153,8 +153,10 @@ void swf_SetPlaceObject(TAG * t,SWFPLACEOBJECT* obj) void swf_GetPlaceObject(TAG * tag,SWFPLACEOBJECT* obj) { - if(!tag) { + if(obj) 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; diff --git a/src/swfstrings.c b/src/swfstrings.c index 1bbd52f..f288276 100644 --- a/src/swfstrings.c +++ b/src/swfstrings.c @@ -151,7 +151,7 @@ void textcallback(void*self, int*glyphs, int*advance, int nr, int fontid, int fo 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]; -- 1.7.10.4