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 (from parent 1:
b494b3b
)
fixed memory corruption bug in id allocator
author
kramm
<kramm>
Wed, 12 Nov 2008 10:40:34 +0000
(10:40 +0000)
committer
kramm
<kramm>
Wed, 12 Nov 2008 10:40:34 +0000
(10:40 +0000)
src/swfc.c
patch
|
blob
|
history
diff --git
a/src/swfc.c
b/src/swfc.c
index
c548b5c
..
0a1bf11
100644
(file)
--- a/
src/swfc.c
+++ b/
src/swfc.c
@@
-360,10
+360,11
@@
static void freeFontDictionary()
static void incrementid()
{
static void incrementid()
{
- while(idmap[++id]) {
- if(id==65535)
- syntaxerror("Out of character ids.");
+ while(id<65536 && idmap[id]) {
+ id++;
}
}
+ if(id>=65536)
+ syntaxerror("Out of character ids.");
idmap[id] = 1;
}
idmap[id] = 1;
}
@@
-4330,34
+4331,30
@@
static void parseArgumentsForCommand(char*command)
if(nr<0)
syntaxerror("command %s not known", command);
if(nr<0)
syntaxerror("command %s not known", command);
+#ifndef EMPTY
// catch missing .flash directives at the beginning of a file
if(strcmp(command, "flash") && !stackpos)
{
// catch missing .flash directives at the beginning of a file
if(strcmp(command, "flash") && !stackpos)
{
- syntaxerror("No movie defined- use .flash first");
+ syntaxerror("No movie defined- use .flash first");
}
}
+#endif
#ifdef DEBUG
printf(".%s\n", command);fflush(stdout);
map_dump(&args, stdout, "\t");fflush(stdout);
#endif
#ifdef DEBUG
printf(".%s\n", command);fflush(stdout);
map_dump(&args, stdout, "\t");fflush(stdout);
#endif
+#ifndef EMPTY
(*arguments[nr].func)(&args);
(*arguments[nr].func)(&args);
-
- /*if(!strcmp(command, "button") ||
- !strcmp(command, "action")) {
- while(1) {
- readToken();
- if(type == COMMAND) {
- if(!strcmp(text, "end"))
- break;
- else {
- pushBack();
- break;
- }
- }
+#else
+ if(!strcmp(command, "action") || !strcmp(command, "initaction") ||
+ !strcmp(command, "outline") || !strcmp(command, "gradient")) {
+ readToken();
+ if(type != RAWDATA) {
+ syntaxerror("colon (:) expected");
}
}
- }*/
-
+ }
+#endif
map_clear(&args);
return;
}
map_clear(&args);
return;
}