Read Files are binary
When replaying recordings, the read files are binary, so the file open needs to reflect this so that spurious end of file characters aren't misinterpreted.
This commit is contained in:
parent
aa063ba89f
commit
e3bbf7b266
|
@ -710,7 +710,7 @@ int main(int argc, char **argv) {
|
||||||
} else {
|
} else {
|
||||||
if (Modes.filename[0] == '-' && Modes.filename[1] == '\0') {
|
if (Modes.filename[0] == '-' && Modes.filename[1] == '\0') {
|
||||||
Modes.fd = STDIN_FILENO;
|
Modes.fd = STDIN_FILENO;
|
||||||
} else if ((Modes.fd = open(Modes.filename,O_RDONLY)) == -1) {
|
} else if ((Modes.fd = open(Modes.filename, (O_RDONLY | O_BINARY))) == -1) {
|
||||||
perror("Opening data file");
|
perror("Opening data file");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue