X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Frfxswf.c;h=2a4b2e2281d38f0ea0ae748ae77d3d8d3370453f;hb=219fa13e2a8d3118b26156ef68128dd6c0dd43fd;hp=580a55d768cb1d3fbf4ced3c1922d8c90c6c36a3;hpb=1450e6bbd2d56405dc90a6063635d80ca92e910e;p=swftools.git diff --git a/lib/rfxswf.c b/lib/rfxswf.c index 580a55d..2a4b2e2 100644 --- a/lib/rfxswf.c +++ b/lib/rfxswf.c @@ -61,8 +61,8 @@ void* rfx_alloc(int size) ptr = malloc(size); if(!ptr) { - fprintf(stderr, "FATAL: Out of memory\n"); - /* TODO: we should send a signal, so that the debugger kicks in */ + fprintf(stderr, "FATAL: Out of memory (while trying to claim %d bytes)\n", size); + /* TODO: we should send a signal, so that the debugger kicks in? */ exit(1); } return ptr; @@ -83,8 +83,8 @@ void* rfx_realloc(void*data, int size) } if(!ptr) { - fprintf(stderr, "FATAL: Out of memory\n"); - /* TODO: we should send a signal, so that the debugger kicks in */ + fprintf(stderr, "FATAL: Out of memory (while trying to claim %d bytes)\n", size); + /* TODO: we should send a signal, so that the debugger kicks in? */ exit(1); } return ptr; @@ -103,8 +103,8 @@ void* rfx_calloc(int size) ptr = malloc(size); #endif if(!ptr) { - fprintf(stderr, "FATAL: Out of memory\n"); - /* TODO: we should send a signal, so that the debugger kicks in */ + fprintf(stderr, "FATAL: Out of memory (while trying to claim %d bytes)\n", size); + /* TODO: we should send a signal, so that the debugger kicks in? */ exit(1); } #ifndef HAVE_CALLOC @@ -1315,9 +1315,9 @@ int swf_WriteSWF2(struct writer_t*writer, SWF * swf) // Writes SWF to file, #ifdef INSERT_RFX_TAG - if (swf->firstTag && swf->firstTag->next && - (swf->firstTag->id != ST_REFLEX || swf->firstTag->next->id != ST_REFLEX) - ) { + if ((swf->firstTag && swf->firstTag->id != ST_REFLEX) && + (!swf->firstTag->next || swf->firstTag->next->id != ST_REFLEX)) + { swf_SetBlock(swf_InsertTagBefore(swf, swf->firstTag,ST_REFLEX),"rfx",3); }