X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fas3%2Fpool.c;h=913a84e189ccdc8712d6a8f2c0f3f1a910bb39ed;hp=a74ddb2907448cc5c302248605425bafdbd0fb6b;hb=3dea7306ae2c9590673c10dec1fbabcd6d7e1806;hpb=a75ba56a3af5826224448fd26867eeac7c4bb395 diff --git a/lib/as3/pool.c b/lib/as3/pool.c index a74ddb2..913a84e 100644 --- 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); + } 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 {