diff options
author | Matthias Kramm <kramm@quiss.org> | 2011-10-10 16:51:30 -0700 |
---|---|---|
committer | Matthias Kramm <kramm@quiss.org> | 2011-10-10 16:53:42 -0700 |
commit | c1744d284a69ade21539ac14abc83ef5c9042687 (patch) | |
tree | 28f8780ed5387979c547859f2ea29efc839d3343 | |
parent | 6160c9b4911d7fae10c63952ad87a916f3259df6 (diff) |
bugfixes in swfc
-rw-r--r-- | src/swfc.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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; |