int f;
SWF swf;
SWFFONT* font;
- f = open(filename,O_RDONLY);
+ f = open(filename,O_RDONLY|O_BINARY);
if (f<0) {
warning("Couldn't open file \"%s\": %s", filename, strerror(errno));
font = (SWFFONT*)malloc(sizeof(SWFFONT));
{
SWF head;
int ret;
- int fi=open(slave_filename[t],O_RDONLY);
+ int fi=open(slave_filename[t],O_RDONLY|O_BINARY);
TAG*tag;
if(fi<0 || swf_ReadSWF(fi, &head)<0) {
logf("<fatal> Couldn't open/read %s.", slave_filename[t]);
else {
int ret;
logf("<verbose> master entity %s (named \"%s\")\n", master_filename, master_name);
- fi = open(master_filename, O_RDONLY);
+ fi = open(master_filename, O_RDONLY|O_BINARY);
if(fi<0) {
logf("<fatal> Failed to open %s\n", master_filename);
exit(1);
if(!config.dummy)
{
int ret;
- fi = open(slave_filename[t], O_RDONLY);
+ fi = open(slave_filename[t], O_RDONLY|O_BINARY);
if(!fi) {
logf("<fatal> Failed to open %s\n", slave_filename[t]);
exit(1);
}
initLog(0,-1,0,0,-1, verbose);
- f = open(filename,O_RDONLY);
+ f = open(filename,O_RDONLY|O_BINARY);
if (f<0)
{
if(!filename)
exit(0);
- f = open(filename,O_RDONLY);
+ f = open(filename,O_RDONLY|O_BINARY);
if (f>=0)
{ if FAILED(swf_ReadSWF(f,&swf))
{ fprintf(stderr,"%s is not a valid SWF file or contains errors.\n",filename);