git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a0b7eb
)
swf_LoadFont() now returns more quickly if the file doesn't exist.
author
kramm
<kramm>
Thu, 5 Feb 2004 13:41:50 +0000
(13:41 +0000)
committer
kramm
<kramm>
Thu, 5 Feb 2004 13:41:50 +0000
(13:41 +0000)
lib/modules/swffont.c
patch
|
blob
|
history
diff --git
a/lib/modules/swffont.c
b/lib/modules/swffont.c
index
f8f7707
..
21a19e6
100644
(file)
--- a/
lib/modules/swffont.c
+++ b/
lib/modules/swffont.c
@@
-414,7
+414,7
@@
static int isSWF(const char*filename)
char a[8];
if(!fi) {
perror(filename);
- return 0;
+ return -1;
}
memset(a, 0, sizeof(a));
fread(a, 4, 1, fi);
@@
-428,7
+428,10
@@
static int isSWF(const char*filename)
SWFFONT* swf_LoadFont(char*filename)
{
- if(isSWF(filename)) {
+ int is_swf = isSWF(filename);
+ if(is_swf<0)
+ return 0;
+ if(is_swf) {
return swf_ReadFont(filename);
}
#if defined(HAVE_FREETYPE)