git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed superfluous newlines
[swftools.git]
/
src
/
swfc.c
diff --git
a/src/swfc.c
b/src/swfc.c
index
a8cbdfc
..
2db2d10
100644
(file)
--- a/
src/swfc.c
+++ b/
src/swfc.c
@@
-766,6
+766,10
@@
void s_buttonaction(int flags, char*action)
if(flags==0) {
return;
}
if(flags==0) {
return;
}
+ if(!stackpos || !stack[stackpos-1].tag ||
+ stack[stackpos-1].tag->id != ST_DEFINEBUTTON2) {
+ syntaxerror("Need to be inside a button for .on_* commands");
+ }
setbuttonrecords(stack[stackpos-1].tag);
a = swf_ActionCompile(text, stack[0].swf->fileVersion);
setbuttonrecords(stack[stackpos-1].tag);
a = swf_ActionCompile(text, stack[0].swf->fileVersion);
@@
-919,7
+923,7
@@
static void writeInstance(instance_t* i)
while (frame < currentframe)
{
frame++;
while (frame < currentframe)
{
frame++;
- while (tag->id != ST_SHOWFRAME)
+ while (tag && tag->id != ST_SHOWFRAME)
tag = tag->next;
if (parametersChange(i->history, frame))
{
tag = tag->next;
if (parametersChange(i->history, frame))
{
@@
-2537,7
+2541,6
@@
static double parseExpression(char*s)
int parseTwip(char*str)
{
int v = (int)(parseExpression(str)*20);
int parseTwip(char*str)
{
int v = (int)(parseExpression(str)*20);
- printf("%s = %.2f\n", str, v/20.0);
return v;
}
return v;
}