From c1744d284a69ade21539ac14abc83ef5c9042687 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Mon, 10 Oct 2011 16:51:30 -0700 Subject: [PATCH] bugfixes in swfc --- src/swfc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/swfc.c b/src/swfc.c index 5a7a64ab..21026f29 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -3404,7 +3404,7 @@ static int c_placement(map_t*args, int type) const char* as = map_lookup(args, "as"); const char* blendmode = lu(args, "blend"); const char* filterstr = lu(args, "filter"); - const char* noinstancenamestr = lu(args, "noinstancename"); + const char* noinstancenamestr = ""; U8 blend; MULADD r,g,b,a; float oldwidth; @@ -3414,6 +3414,9 @@ static int c_placement(map_t*args, int type) parameters_t p; U16 set = 0x0000; + if(type==PT_PUT) + noinstancenamestr = lu(args, "noinstancename"); + if(type==9) { // (?) .rotate or .arcchange pivotstr = lu(args, "pivot"); @@ -4131,7 +4134,9 @@ static char* readfile(char*filename) l = ftell(fi); fseek(fi, 0, SEEK_SET); text = rfx_alloc(l+1); - fread(text, l, 1, fi); + int r = fread(text, l, 1, fi); + if(r<1) + syntaxerror("Couldn't read file %s: %s", filename, strerror(errno)); text[l]=0; fclose(fi); return text; -- 2.11.4.GIT