X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Ffiles.c;h=52e1552caa7348f1947745ab2f6c153c6c503ccb;hb=fff0629f8e37e5a94549502096bf595f19339547;hp=10e5de6e04a75ff96f797a1c02758b58943e341b;hpb=be3759d7bc8e2d537974363a32389f9e47d8c867;p=swftools.git diff --git a/lib/as3/files.c b/lib/as3/files.c index 10e5de6..52e1552 100644 --- a/lib/as3/files.c +++ b/lib/as3/files.c @@ -131,6 +131,9 @@ char*find_file(char*filename) } return 0; } + if(!i) { + as3_warning("Include directory stack is empty, while looking for file %s", filename); + } while(i) { char*p = concat_paths(i->path, filename); fi = fopen(p, "rb"); @@ -146,12 +149,12 @@ char*find_file(char*filename) char*enter_file(char*filename, void*state) { if(include_stack_ptr >= MAX_INCLUDE_DEPTH) { - syntaxerror("Includes nested too deeply"); + as3_error("Includes nested too deeply"); exit(1); } char*fullfilename = find_file(filename); if(!fullfilename) { - syntaxerror("Couldn't find file %s", filename); + as3_error("Couldn't find file %s", filename); include_dir_t*i = current_include_dirs; while(i) { fprintf(stderr, "include dir: %s\n", i->path);