git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
as3compile: small bugfixes, added documentation
[swftools.git]
/
lib
/
as3
/
pool.c
diff --git
a/lib/as3/pool.c
b/lib/as3/pool.c
index
a74ddb2
..
913a84e
100644
(file)
--- a/
lib/as3/pool.c
+++ b/
lib/as3/pool.c
@@
-800,6
+800,10
@@
int constant_get_index(pool_t*pool, constant_t*c)
return pool_register_float(pool, c->f);
} else if(c->type == CONSTANT_STRING) {
return pool_register_string2(pool, c->s);
return pool_register_float(pool, c->f);
} else if(c->type == CONSTANT_STRING) {
return pool_register_string2(pool, c->s);
+ } else if(c->type == CONSTANT_UNDEFINED) {
+ /* write undefined with index 0 (and no type). Otherwise, the FlashPlayer
+ seems to throw an "attempt to read out of bounds" exception */
+ return 0;
} else if(!constant_has_index(c)) {
return 1;
} else {
} else if(!constant_has_index(c)) {
return 1;
} else {