/* PSPP - a program for statistical analysis.
- Copyright (C) 2011, 2013 Free Software Foundation, Inc.
+ Copyright (C) 2011, 2013, 2014 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
zr->members[zr->nm++] = zm;
- zm->fp = fopen (zr->filename, "r");
+ zm->fp = fopen (zr->filename, "rb");
zm->ref_cnt = 1;
zm->errs = zr->errs;
zr->nm = 0;
- zr->fr = fopen (filename, "r");
+ zr->fr = fopen (filename, "rb");
if (NULL == zr->fr)
{
ds_put_cstr (zr->errs, strerror (errno));
do
{
- fread (&byte, 1, 1, fp);
+ if (1 != fread (&byte, 1, 1, fp))
+ break;
if ( byte == seq[state])
state++;