git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set previously uninitialized variables
[swftools.git]
/
lib
/
modules
/
swftext.c
diff --git
a/lib/modules/swftext.c
b/lib/modules/swftext.c
index
d7c0470
..
24bde3c
100644
(file)
--- a/
lib/modules/swftext.c
+++ b/
lib/modules/swftext.c
@@
-400,7
+400,7
@@
swf_FontExtract_DefineTextCallback(int id, SWFFONT * f, TAG * t, int jobs,
SRECT r;
MATRIX m;
U8 gbits, abits;
SRECT r;
MATRIX m;
U8 gbits, abits;
- int fid = 0;
+ int fid = -1;
RGBA color;
int x = 0, y = 0;
int fontsize = 0;
RGBA color;
int x = 0, y = 0;
int fontsize = 0;
@@
-459,7
+459,6
@@
swf_FontExtract_DefineTextCallback(int id, SWFFONT * f, TAG * t, int jobs,
adv = swf_GetBits(t, abits);
xpos += adv;
adv = swf_GetBits(t, abits);
xpos += adv;
- // <deprecated>
if (id == fid) {
if (jobs & FEDTJ_PRINT) {
int code = f->glyph2ascii[glyph];
if (id == fid) {
if (jobs & FEDTJ_PRINT) {
int code = f->glyph2ascii[glyph];
@@
-467,12
+466,7
@@
swf_FontExtract_DefineTextCallback(int id, SWFFONT * f, TAG * t, int jobs,
}
if (jobs & FEDTJ_MODIFY)
f->glyph[glyph].advance = adv * 20; //?
}
if (jobs & FEDTJ_MODIFY)
f->glyph[glyph].advance = adv * 20; //?
- } else {
- if (jobs & FEDTJ_PRINT) {
- printf("?");
- }
}
}
- // </deprecated>
buf[i] = glyph;
}
buf[i] = glyph;
}
@@
-821,6
+815,7
@@
int swf_FontInitUsage(SWFFONT * f)
}
f->use = rfx_alloc(sizeof(FONTUSAGE));
f->use->is_reduced = 0;
}
f->use = rfx_alloc(sizeof(FONTUSAGE));
f->use->is_reduced = 0;
+ f->use->used_glyphs = 0;
f->use->chars = rfx_calloc(sizeof(f->use->chars[0]) * f->numchars);
return 0;
}
f->use->chars = rfx_calloc(sizeof(f->use->chars[0]) * f->numchars);
return 0;
}